mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Merge pull request #1344 from strohu/patch-1
Fix is_ascii check when determining next layer
This commit is contained in:
commit
4fd71d7bfd
@ -100,7 +100,7 @@ class RootContext(object):
|
|||||||
is_ascii = (
|
is_ascii = (
|
||||||
len(d) == 3 and
|
len(d) == 3 and
|
||||||
# expect A-Za-z
|
# expect A-Za-z
|
||||||
all(65 <= x <= 90 and 97 <= x <= 122 for x in six.iterbytes(d))
|
all(65 <= x <= 90 or 97 <= x <= 122 for x in six.iterbytes(d))
|
||||||
)
|
)
|
||||||
if self.config.rawtcp and not is_ascii:
|
if self.config.rawtcp and not is_ascii:
|
||||||
return protocol.RawTCPLayer(top_layer)
|
return protocol.RawTCPLayer(top_layer)
|
||||||
|
Loading…
Reference in New Issue
Block a user