Let cgi.parse_header() properly unquote headers (patch #1008597).

This commit is contained in:
Johannes Gijsbers 2004-08-14 15:39:34 +00:00
parent 34c4120731
commit 9e15dd6861
1 changed files with 1 additions and 0 deletions

View File

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