From: Johannes Gijsbers Date: Sat, 14 Aug 2004 15:39:34 +0000 (+0000) Subject: Let cgi.parse_header() properly unquote headers (patch #1008597). X-Git-Tag: v2.4a3~246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e15dd6861602449e21024d18214f6da0bbe3df7;p=thirdparty%2FPython%2Fcpython.git Let cgi.parse_header() properly unquote headers (patch #1008597). --- diff --git a/Lib/cgi.py b/Lib/cgi.py index 7c3d6579434f..fb40ed36a3c1 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -338,6 +338,7 @@ def parse_header(line): value = p[i+1:].strip() if len(value) >= 2 and value[0] == value[-1] == '"': value = value[1:-1] + value = value.replace('\\\\', '\\').replace('\\"', '"') pdict[name] = value return key, pdict