Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bd6940c authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

merge from open-source master

Change-Id: Id2305d345a6cc248e08c0bdc6f3c8d999cc1d861
parents 6a102b4b e6c2b8d6
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -204,10 +204,13 @@ public class HttpsConnection extends Connection {
                BasicHttpRequest proxyReq = new BasicHttpRequest
                    ("CONNECT", mHost.toHostString());

                // add all 'proxy' headers from the original request
                // add all 'proxy' headers from the original request, we also need
                // to add 'host' header unless we want proxy to answer us with a
                // 400 Bad Request
                for (Header h : req.mHttpRequest.getAllHeaders()) {
                    String headerName = h.getName().toLowerCase();
                    if (headerName.startsWith("proxy") || headerName.equals("keep-alive")) {
                    if (headerName.startsWith("proxy") || headerName.equals("keep-alive")
                            || headerName.equals("host")) {
                        proxyReq.addHeader(h);
                    }
                }