From cd0dae890cc98070d6d833e15008906aae7af5f2 Mon Sep 17 00:00:00 2001 From: George Yoshida Date: Sat, 23 Aug 2014 12:10:45 +0900 Subject: [PATCH] For content-disposition response header field, try to parse filename parameter even if it's not quoted. --- network/get_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/get_url b/network/get_url index e2384e4ebd5..5c5faa4624a 100644 --- a/network/get_url +++ b/network/get_url @@ -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: