Kaydet (Commit) 9e15dd68 authored tarafından Johannes Gijsbers's avatar Johannes Gijsbers

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

üst 34c41207
...@@ -338,6 +338,7 @@ def parse_header(line): ...@@ -338,6 +338,7 @@ def parse_header(line):
value = p[i+1:].strip() value = p[i+1:].strip()
if len(value) >= 2 and value[0] == value[-1] == '"': if len(value) >= 2 and value[0] == value[-1] == '"':
value = value[1:-1] value = value[1:-1]
value = value.replace('\\\\', '\\').replace('\\"', '"')
pdict[name] = value pdict[name] = value
return key, pdict return key, pdict
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment