1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

responseloader: for py2, look at the original header line only

This commit is contained in:
Ilya Kreymer 2017-03-10 11:16:05 -08:00
parent d04f8fc2e3
commit baa248c502

View File

@ -399,7 +399,12 @@ class LiveWebLoader(BaseLoader):
except: #pragma: no cover
#PY 2
resp_headers = orig_resp.msg.headers
for (n, v), line in zip(orig_resp.getheaders(), resp_headers):
for line in resp_headers:
n, v = line.split(':', 1)
n = n.lower()
v = v.strip()
if n in self.SKIP_HEADERS:
continue