mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-11-28 07:40:41 +00:00
fix #4630
This commit is contained in:
parent
de0951462d
commit
d47eb7556a
@ -172,7 +172,7 @@ class TlsConfig:
|
||||
server.alpn_offers = tuple(client.alpn_offers)
|
||||
else:
|
||||
server.alpn_offers = tuple(x for x in client.alpn_offers if x != b"h2")
|
||||
elif client.tls_established:
|
||||
elif client.tls:
|
||||
# We would perfectly support HTTP/1 -> HTTP/2, but we want to keep things on the same protocol version.
|
||||
# There are some edge cases where we want to mirror the regular server's behavior accurately,
|
||||
# for example header capitalization.
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import fileinput
|
||||
import sys
|
||||
import re
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 3:
|
||||
@ -10,7 +11,7 @@ if __name__ == "__main__":
|
||||
port = sys.argv[1]
|
||||
matches = False
|
||||
for line in fileinput.input(sys.argv[2:]):
|
||||
if line.startswith("["):
|
||||
if re.match(r"^\[|(\d+\.){3}", line):
|
||||
matches = port in line
|
||||
if matches:
|
||||
print(line, end="")
|
||||
|
Loading…
Reference in New Issue
Block a user