aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http/http1/read.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-05 11:47:52 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-05 11:47:52 +1200
commitc0c45c051a6eadf34d38f1b0d3d96c6a9196f733 (patch)
tree23b037d7c9280701b1ddecee18dad8dfb5afaa91 /netlib/http/http1/read.py
parent2355c29c0ef59019950da3a0410cd91bfeedb872 (diff)
downloadmitmproxy-c0c45c051a6eadf34d38f1b0d3d96c6a9196f733.tar.gz
mitmproxy-c0c45c051a6eadf34d38f1b0d3d96c6a9196f733.tar.bz2
mitmproxy-c0c45c051a6eadf34d38f1b0d3d96c6a9196f733.zip
Fix test that may fail due to binary header data
This is just inherently not a determinisitc test. We don't use the log HTTP interface any more, so it can just go. A more radical "solution" is inbound shortly. Fixes #1207
Diffstat (limited to 'netlib/http/http1/read.py')
-rw-r--r--netlib/http/http1/read.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/netlib/http/http1/read.py b/netlib/http/http1/read.py
index bf4c2f0c..a4c341fd 100644
--- a/netlib/http/http1/read.py
+++ b/netlib/http/http1/read.py
@@ -340,7 +340,9 @@ def _read_headers(rfile):
raise ValueError()
ret.append((name, value))
except ValueError:
- raise exceptions.HttpSyntaxException("Invalid headers")
+ raise exceptions.HttpSyntaxException(
+ "Invalid header line: %s" % repr(line)
+ )
return headers.Headers(ret)