aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--mitmproxy/net/http/http1/read.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 6b514131..0d5943d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,7 @@ dist/
mitmproxy/contrib/kaitaistruct/*.ksy
.pytest_cache
__pycache__
+.hypothesis/
# UI
diff --git a/mitmproxy/net/http/http1/read.py b/mitmproxy/net/http/http1/read.py
index fbf5da2b..0fc03f1b 100644
--- a/mitmproxy/net/http/http1/read.py
+++ b/mitmproxy/net/http/http1/read.py
@@ -220,8 +220,8 @@ def expected_http_body_size(
if size < 0:
raise ValueError()
return size
- except ValueError:
- raise exceptions.HttpSyntaxException("Unparseable Content Length")
+ except ValueError as e:
+ raise exceptions.HttpSyntaxException("Unparseable Content Length") from e
if not response:
return 0
return -1