diff options
| author | 2019-09-18 10:52:05 +0100 | |
|---|---|---|
| committer | 2019-09-18 10:52:05 +0100 | |
| commit | 312f8906ae32aeb973ab6712decb060ff566ade7 (patch) | |
| tree | 7f70b8868d0ffd37c3472a65ceb4d27d08883373 /src/utils/http.py | |
| parent | move 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/http.py')
| -rw-r--r-- | src/utils/http.py | 5 |
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, |
