mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
For content-disposition response header field, try to parse filename parameter even if it's not quoted.
This commit is contained in:
parent
a419ffdf41
commit
b2385870af
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ def extract_filename_from_headers(headers):
|
|||
|
||||
Looks for the content-disposition header and applies a regex.
|
||||
Returns the filename if successful, else None."""
|
||||
cont_disp_regex = 'attachment; ?filename="(.+)"'
|
||||
cont_disp_regex = 'attachment; ?filename="?([^"]+)'
|
||||
res = None
|
||||
|
||||
if 'content-disposition' in headers:
|
||||
|
|
Loading…
Reference in a new issue