mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Merge pull request #932 from fimad/master
Do not send Proxy-Agent in CONNECT responses, fix #783
This commit is contained in:
commit
a54fc2785f
@ -456,14 +456,13 @@ def make_connect_request(address):
|
|||||||
|
|
||||||
|
|
||||||
def make_connect_response(http_version):
|
def make_connect_response(http_version):
|
||||||
headers = Headers(
|
# Do not send any response headers as it breaks proxying non-80 ports on
|
||||||
Proxy_Agent=version.NAMEVERSION
|
# Android emulators using the -http-proxy option.
|
||||||
)
|
|
||||||
return HTTPResponse(
|
return HTTPResponse(
|
||||||
http_version,
|
http_version,
|
||||||
200,
|
200,
|
||||||
"Connection established",
|
"Connection established",
|
||||||
headers,
|
Headers(),
|
||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user