aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-18 10:52:05 +0100
committerGravatar jesopo2019-09-18 10:52:05 +0100
commit312f8906ae32aeb973ab6712decb060ff566ade7 (patch)
tree7f70b8868d0ffd37c3472a65ceb4d27d08883373 /src/utils
parentmove q.close() to where it will be called even if deadline is hit (diff)
signature
show "bad" data in HTTPParsingException message
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/http.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index a6a074ab..2207a86c 100644
--- a/src/utils/http.py
+++ b/src/utils/http.py
@@ -42,8 +42,9 @@ class HTTPTimeoutException(HTTPException):
def __init__(self):
Exception.__init__(self, "HTTP request timed out")
class HTTPParsingException(HTTPException):
- def __init__(self, message: str, data: str=None):
- Exception.__init__(self, message or "HTTP parsing failed")
+ def __init__(self, message: str, data: str):
+ Exception.__init__(self,
+ message or ("HTTP parsing failed:\n%s" % data))
class HTTPWrongContentTypeException(HTTPException):
def __init__(self, message: str=None):
Exception.__init__(self,