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

Commit 0fc2c139 authored by Doug Zongker's avatar Doug Zongker Committed by The Android Open Source Project
Browse files

AI 144044: First cut of tunneling HTTP requests over gtalk connection:

  - We define HttpRequest and HttpResponse protocol buffers.
  The RMQ mechanism is *not* used for these (though the
  messages define rmq id fields in case we want to start).
  - GTalkHttpClient will send an http request over the
  connection to MCS if:
  - gtalk_tunnel_http in gservices is turned on
  - the request destination is the android proxy
  - it can make a connection to gtalkservice
  The request falls back to using GoogleHttpClient if it can't
  be processed over the MCS connection.
  A few shortcuts are taken with cookie handling, but these
  are okay for the envisioned usage.

Automated import of CL 144044
parent ad28bed5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -196,6 +196,12 @@ public class GoogleHttpClient implements HttpClient {
        }
    }

    public String rewriteURI(String original) {
        UrlRules rules = UrlRules.getRules(mResolver);
        UrlRules.Rule rule = rules.matchRule(original);
        return rule.apply(original);
    }

    public HttpResponse execute(HttpUriRequest request, HttpContext context)
            throws IOException {
        // Rewrite the supplied URL...