From 5762a23fb01a3d47db7db2b7d3fb2fa333065020 Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Tue, 1 Feb 2011 11:50:55 +0000 Subject: [PATCH] Fix for bug 3407633 Cookie not set in CookieManager Adding http:// at the start of the url if there is no :// already Change-Id: If292f60af3289a9849ff060ffacc0d97e3120132 --- core/java/android/webkit/CookieManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java index ff9fe1c037f42..1fea65adf0744 100644 --- a/core/java/android/webkit/CookieManager.java +++ b/core/java/android/webkit/CookieManager.java @@ -294,6 +294,8 @@ public final class CookieManager { */ public void setCookie(String url, String value) { if (JniUtil.useChromiumHttpStack()) { + if (url.indexOf("://") == -1) + url = "http://" + url; nativeSetCookie(url, value); return; } @@ -425,6 +427,8 @@ public final class CookieManager { */ public String getCookie(String url) { if (JniUtil.useChromiumHttpStack()) { + if (url.indexOf("://") == -1) + url = "http://" + url; return nativeGetCookie(url); }