From d60257e767a8cc47054504c1e862196a19fda864 Mon Sep 17 00:00:00 2001 From: Will Coster Date: Sat, 13 Feb 2016 16:12:56 -0800 Subject: Do not send Proxy-Agent in CONNECT responses Sending any headers at all in response to a CONNECT request breaks proxying Android emulators on all non-80 ports. Issue: #783 --- libmproxy/models/http.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libmproxy/models') diff --git a/libmproxy/models/http.py b/libmproxy/models/http.py index 3c024e76..a2a345d7 100644 --- a/libmproxy/models/http.py +++ b/libmproxy/models/http.py @@ -456,14 +456,13 @@ def make_connect_request(address): def make_connect_response(http_version): - headers = Headers( - Proxy_Agent=version.NAMEVERSION - ) + # Do not send any response headers as it breaks proxying non-80 ports on + # Android emulators using the -http-proxy option. return HTTPResponse( http_version, 200, "Connection established", - headers, + Headers(), "", ) -- cgit v1.2.3