Commit 795eacce by James Cammarata

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
parents bc662355 b2385870
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment