mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #10728 from Bo98/content-disposition-basename
download_strategy: only take basename of Content-Disposition
This commit is contained in:
commit
7ab7ace64e
@ -458,7 +458,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
|||||||
filename = URI.decode_www_form_component(encoded_filename).encode(encoding) if encoding && encoded_filename
|
filename = URI.decode_www_form_component(encoded_filename).encode(encoding) if encoding && encoded_filename
|
||||||
end
|
end
|
||||||
|
|
||||||
filename || content_disposition.filename
|
(filename || content_disposition.filename).rpartition("/")[-1]
|
||||||
end
|
end
|
||||||
|
|
||||||
filenames = lines.map(&parse_content_disposition).compact
|
filenames = lines.map(&parse_content_disposition).compact
|
||||||
|
Loading…
x
Reference in New Issue
Block a user