From 1e93e42883ba43642b4e2bfb231ee74a323706c7 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 22 Jul 2012 12:40:27 +1200 Subject: [PATCH] Escape special characters in first line error log. --- libpathod/pathod.py | 2 +- test/test_pathod.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libpathod/pathod.py b/libpathod/pathod.py index e4a14193b..9d155301f 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 86f37f01e..4a8d90d58 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