summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDoug Zongker <>2009-04-01 12:01:43 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-01 12:01:43 -0700
commit0fc2c1392a2a2f046f8b613eefbcb364869647fc (patch)
tree85996738a42f32d86f9e8e9ea4084188ad46264a /core
parentad28bed52ccabd252149b5297a2d94bacdb388cc (diff)
downloadframeworks_base-0fc2c1392a2a2f046f8b613eefbcb364869647fc.zip
frameworks_base-0fc2c1392a2a2f046f8b613eefbcb364869647fc.tar.gz
frameworks_base-0fc2c1392a2a2f046f8b613eefbcb364869647fc.tar.bz2
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
Diffstat (limited to 'core')
-rw-r--r--core/java/com/google/android/net/GoogleHttpClient.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/com/google/android/net/GoogleHttpClient.java b/core/java/com/google/android/net/GoogleHttpClient.java
index ac9ad73..871c925 100644
--- a/core/java/com/google/android/net/GoogleHttpClient.java
+++ b/core/java/com/google/android/net/GoogleHttpClient.java
@@ -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...
@@ -262,7 +268,7 @@ public class GoogleHttpClient implements HttpClient {
*
* @param originalUserAgent to modify (however you identify yourself)
* @return user agent with a "yes, I really can handle gzip" token added.
- * @deprecated Use {@link #GoogleHttpClient(android.content.ContentResolver, String, boolean)}
+ * @deprecated Use {@link #GoogleHttpClient(android.content.ContentResolver, String, boolean)}
*/
public static String getGzipCapableUserAgent(String originalUserAgent) {
return originalUserAgent + "; gzip";