mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-24 17:19:46 +00:00
minor sans-io adjustments
This commit is contained in:
parent
0b393b2878
commit
72dde3c44f
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,6 +17,7 @@ dist/
|
||||
mitmproxy/contrib/kaitaistruct/*.ksy
|
||||
.pytest_cache
|
||||
__pycache__
|
||||
.hypothesis/
|
||||
|
||||
# UI
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user