Merge pull request #8725 from quiver/fix-get_url-content-disposition

[get_url module]parse content-disposition filename parameter even if it's not quoted
This commit is contained in:
James Cammarata 2014-08-25 10:43:06 -05:00
commit 795eaccecb

View file

@ -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: