aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-07-22 12:40:27 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-07-22 12:40:27 +1200
commit1e93e42883ba43642b4e2bfb231ee74a323706c7 (patch)
tree046ededc379dcbfc386156883b1dc668d5247ae6
parent8d8ede7e265591e94f6e2db5bf79f6b85e822912 (diff)
downloadmitmproxy-1e93e42883ba43642b4e2bfb231ee74a323706c7.tar.gz
mitmproxy-1e93e42883ba43642b4e2bfb231ee74a323706c7.tar.bz2
mitmproxy-1e93e42883ba43642b4e2bfb231ee74a323706c7.zip
Escape special characters in first line error log.
-rw-r--r--libpathod/pathod.py2
-rw-r--r--test/test_pathod.py1
2 files changed, 1 insertions, 2 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py
index e4a14193..9d155301 100644
--- a/libpathod/pathod.py
+++ b/libpathod/pathod.py
@@ -30,7 +30,7 @@ class PathodHandler(tcp.BaseHandler):
parts = http.parse_init_http(line)
if not parts:
- s = "Invalid first line: %s"%line.rstrip()
+ s = "Invalid first line: %s"%repr(line)
self.info(s)
self.server.add_log(
dict(
diff --git a/test/test_pathod.py b/test/test_pathod.py
index 86f37f01..4a8d90d5 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -122,7 +122,6 @@ class _DaemonTests:
assert "Invalid" in l["msg"]
-
class TestDaemon(_DaemonTests):
SSL = False