diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-05-21 10:15:37 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-05-21 10:15:37 +1200 |
commit | 96d8ec1ee33b076a472afc3053fdd8256559fcc3 (patch) | |
tree | 933549b94c497b70eb6165f90bef191eebca4cc7 /netlib/http/http1/read.py | |
parent | 84144ca0c635f4a42c8ba8a13e779fe127a81d45 (diff) | |
parent | b538138ead1dc8550f2d4e4a3f30ff70abb95f53 (diff) | |
download | mitmproxy-96d8ec1ee33b076a472afc3053fdd8256559fcc3.tar.gz mitmproxy-96d8ec1ee33b076a472afc3053fdd8256559fcc3.tar.bz2 mitmproxy-96d8ec1ee33b076a472afc3053fdd8256559fcc3.zip |
Merge branch 'multidict' of https://github.com/mhils/mitmproxy into mhils-multidict
Diffstat (limited to 'netlib/http/http1/read.py')
-rw-r--r-- | netlib/http/http1/read.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netlib/http/http1/read.py b/netlib/http/http1/read.py index 6e3a1b93..d30976bd 100644 --- a/netlib/http/http1/read.py +++ b/netlib/http/http1/read.py @@ -316,14 +316,14 @@ def _read_headers(rfile): if not ret: raise HttpSyntaxException("Invalid headers") # continued header - ret[-1][1] = ret[-1][1] + b'\r\n ' + line.strip() + ret[-1] = (ret[-1][0], ret[-1][1] + b'\r\n ' + line.strip()) else: try: name, value = line.split(b":", 1) value = value.strip() if not name: raise ValueError() - ret.append([name, value]) + ret.append((name, value)) except ValueError: raise HttpSyntaxException("Invalid headers") return Headers(ret) |