Fix for bug 3407633 Cookie not set in CookieManager - DO NOT MERGE

Setting http:// at the start if there is no :// in the url

Change-Id: Idfae4f724808267fe9c8ab3864cfc4305ddac0e7
This commit is contained in:
Kristian Monsen
2011-02-01 15:12:31 +00:00
parent 84a34059eb
commit 8b8f79898d

View File

@ -294,6 +294,8 @@ public final class CookieManager {
*/ */
public void setCookie(String url, String value) { public void setCookie(String url, String value) {
if (JniUtil.useChromiumHttpStack()) { if (JniUtil.useChromiumHttpStack()) {
if (url.indexOf("://") == -1)
url = "http://" + url;
nativeSetCookie(url, value); nativeSetCookie(url, value);
return; return;
} }
@ -425,6 +427,8 @@ public final class CookieManager {
*/ */
public String getCookie(String url) { public String getCookie(String url) {
if (JniUtil.useChromiumHttpStack()) { if (JniUtil.useChromiumHttpStack()) {
if (url.indexOf("://") == -1)
url = "http://" + url;
return nativeGetCookie(url); return nativeGetCookie(url);
} }