Change regex to match filename if header also contains filename*.
This commit is contained in:
parent
eccbc4ea4b
commit
17c3a66265
@ -339,7 +339,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
||||
end
|
||||
end
|
||||
|
||||
filenames = lines.map { |line| line[/^Content\-Disposition:\s*attachment;\s*filename=(["']?)(.+)\1$/i, 2] }
|
||||
filenames = lines.map { |line| line[/^Content\-Disposition:\s*attachment;\s*filename=(["']?)([^;]+)\1/i, 2] }
|
||||
.compact
|
||||
|
||||
basename = filenames.last || parse_basename(redirect_url)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user