mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
download_strategy: add another presence check.
This commit is contained in:
parent
160e7da779
commit
97b66d3ae7
@ -487,7 +487,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
|||||||
# content-disposition: attachment; filename="myapp-1.2.3.pkg"; filename*=UTF-8''"myapp-1.2.3.pkg"
|
# content-disposition: attachment; filename="myapp-1.2.3.pkg"; filename*=UTF-8''"myapp-1.2.3.pkg"
|
||||||
# Then the encoded_filename will come back as the empty string, in which case we should fall back to the
|
# Then the encoded_filename will come back as the empty string, in which case we should fall back to the
|
||||||
# `filename` parameter.
|
# `filename` parameter.
|
||||||
if encoding && encoded_filename.present?
|
if encoding.present? && encoded_filename.present?
|
||||||
filename = URI.decode_www_form_component(encoded_filename).encode(encoding)
|
filename = URI.decode_www_form_component(encoded_filename).encode(encoding)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user