summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJohannes Gijsbers <jlg@dds.nl>2004-08-14 15:39:34 (GMT)
committerJohannes Gijsbers <jlg@dds.nl>2004-08-14 15:39:34 (GMT)
commit9e15dd6861602449e21024d18214f6da0bbe3df7 (patch)
tree6ac5c18bc37bf254ec4dada215ff91df243834ac /Lib
parent34c4120731b498663e38edc4d975d4a8c3071da0 (diff)
downloadcpython-9e15dd6861602449e21024d18214f6da0bbe3df7.zip
cpython-9e15dd6861602449e21024d18214f6da0bbe3df7.tar.gz
cpython-9e15dd6861602449e21024d18214f6da0bbe3df7.tar.bz2
Let cgi.parse_header() properly unquote headers (patch #1008597).
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/cgi.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py
index 7c3d657..fb40ed3 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