OSDN Git Service

CookieManager.getCookie() should include HTTP-only cookies
authorSteve Block <steveblock@google.com>
Thu, 28 Oct 2010 12:48:16 +0000 (13:48 +0100)
committerSteve Block <steveblock@google.com>
Thu, 28 Oct 2010 12:48:16 +0000 (13:48 +0100)
This matches the behaviour of the Android Java HTTP stack

Change-Id: I280e524a849dc93bae54795543b1440c3be98c27

WebKit/android/jni/CookieManager.cpp

index 9688851..f686b7f 100644 (file)
@@ -77,7 +77,9 @@ static jstring getCookie(JNIEnv* env, jobject, jstring url)
 {
 #if USE(CHROME_NETWORK_STACK)
     GURL gurl(jstringToStdString(env, url));
-    std::string cookies = WebRequestContext::get(false)->cookie_store()->GetCookieMonster()->GetCookiesWithOptions(gurl, CookieOptions());
+    CookieOptions options;
+    options.set_include_httponly();
+    std::string cookies = WebRequestContext::get(false)->cookie_store()->GetCookieMonster()->GetCookiesWithOptions(gurl, options);
     return env->NewStringUTF(cookies.c_str());
 #else
     // The Android HTTP stack is implemented Java-side.