For content-disposition response header field, try to parse filename parameter even if it's not quoted.

pull/8725/head
George Yoshida 10 years ago
parent a419ffdf41
commit b2385870af

@ -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…
Cancel
Save