Support Content-Disposition: inline.
This commit is contained in:
parent
8b3228ad8a
commit
b0742db4fa
@ -352,7 +352,8 @@ 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*(?:inline|attachment);\s*filename=(["']?)([^;]+)\1/i, 2] }
|
||||
.compact
|
||||
|
||||
basename = filenames.last || parse_basename(redirect_url)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user