From cd0d39ee5e21589526b0fb716e4b2ec537bbb69f Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 18 Sep 2019 14:20:59 +0100 Subject: also show "bad" data in HTTPParsingException when a message is provided --- src/utils/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/http.py') diff --git a/src/utils/http.py b/src/utils/http.py index 2207a86c..4896866e 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -44,7 +44,7 @@ class HTTPTimeoutException(HTTPException): class HTTPParsingException(HTTPException): def __init__(self, message: str, data: str): Exception.__init__(self, - message or ("HTTP parsing failed:\n%s" % data)) + "%s\n%s" % ((message or "HTTP parsing failed"), data)) class HTTPWrongContentTypeException(HTTPException): def __init__(self, message: str=None): Exception.__init__(self, -- cgit v1.3.1-10-gc9f91