download_strategy: use blank.

This commit is contained in:
Mike McQuaid 2023-03-21 12:18:17 +00:00 committed by GitHub
parent f197f164c8
commit fd0b3e8035
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -492,7 +492,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
end end
filename ||= content_disposition.filename filename ||= content_disposition.filename
next if filename.nil? next if filename.blank?
# Servers may include '/' in their Content-Disposition filename header. Take only the basename of this, because: # Servers may include '/' in their Content-Disposition filename header. Take only the basename of this, because:
# - Unpacking code assumes this is a single file - not something living in a subdirectory. # - Unpacking code assumes this is a single file - not something living in a subdirectory.