From 72dde3c44f70a6616cf91855f171e5f563460ebb Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 5 Apr 2020 00:51:36 +0200 Subject: minor sans-io adjustments --- mitmproxy/net/http/http1/read.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mitmproxy') 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 -- cgit v1.2.3