mirror of
https://github.com/python/cpython
synced 2024-10-06 18:05:53 +00:00
Let cgi.parse_header() properly unquote headers (patch #1008597).
This commit is contained in:
parent
34c4120731
commit
9e15dd6861
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue