mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Merge pull request #3900 from mhils/sans-io-adjustments
Minor sans-io adjustments
This commit is contained in:
commit
775e6beec5
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,6 +17,7 @@ dist/
|
|||||||
mitmproxy/contrib/kaitaistruct/*.ksy
|
mitmproxy/contrib/kaitaistruct/*.ksy
|
||||||
.pytest_cache
|
.pytest_cache
|
||||||
__pycache__
|
__pycache__
|
||||||
|
.hypothesis/
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
|
|
||||||
|
@ -220,8 +220,8 @@ def expected_http_body_size(
|
|||||||
if size < 0:
|
if size < 0:
|
||||||
raise ValueError()
|
raise ValueError()
|
||||||
return size
|
return size
|
||||||
except ValueError:
|
except ValueError as e:
|
||||||
raise exceptions.HttpSyntaxException("Unparseable Content Length")
|
raise exceptions.HttpSyntaxException("Unparseable Content Length") from e
|
||||||
if not response:
|
if not response:
|
||||||
return 0
|
return 0
|
||||||
return -1
|
return -1
|
||||||
|
Loading…
Reference in New Issue
Block a user