Title: [112080] trunk/Source/WebCore
- Revision
- 112080
- Author
- [email protected]
- Date
- 2012-03-26 05:42:44 -0700 (Mon, 26 Mar 2012)
Log Message
[BlackBerry] Cookies mismatch when login to gmail.
https://bugs.webkit.org/show_bug.cgi?id=82165
Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty
in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest
for redirection loading.
This issue didn't happen before because we used m_cookieData not the cookie header.
Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed.
Patch by Jason Liu <[email protected]> on 2012-03-26
Reviewed by George Staikos.
No new tests. It is a refactoring issue.
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (112079 => 112080)
--- trunk/Source/WebCore/ChangeLog 2012-03-26 12:32:18 UTC (rev 112079)
+++ trunk/Source/WebCore/ChangeLog 2012-03-26 12:42:44 UTC (rev 112080)
@@ -1,3 +1,22 @@
+2012-03-26 Jason Liu <[email protected]>
+
+ [BlackBerry] Cookies mismatch when login to gmail.
+ https://bugs.webkit.org/show_bug.cgi?id=82165
+
+ Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty
+ in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest
+ for redirection loading.
+
+ This issue didn't happen before because we used m_cookieData not the cookie header.
+ Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed.
+
+ Reviewed by George Staikos.
+
+ No new tests. It is a refactoring issue.
+
+ * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
+ (WebCore::ResourceRequest::initializePlatformRequest):
+
2012-03-26 Alexis Menard <[email protected]>
Increase code sharing between StylePropertySet and CSSPropertyLonghand.
Modified: trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp (112079 => 112080)
--- trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp 2012-03-26 12:32:18 UTC (rev 112079)
+++ trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp 2012-03-26 12:42:44 UTC (rev 112080)
@@ -154,14 +154,15 @@
String value = it->second;
if (!key.isEmpty() && !value.isEmpty()) {
// We need to check the encoding and encode the cookie's value using latin1 or utf8 to support unicode characters.
- if (equalIgnoringCase(key, "Cookie"))
+ // We wo't use the old cookies of resourceRequest for new location because these cookies may be changed by redirection.
+ if (!equalIgnoringCase(key, "Cookie"))
+ platformRequest.addHeader(key.latin1().data(), value.latin1().data());
+ else if (!isRedirect)
platformRequest.addHeader(key.latin1().data(), value.containsOnlyLatin1() ? value.latin1().data() : value.utf8().data());
- else
- platformRequest.addHeader(key.latin1().data(), value.latin1().data());
}
}
- // Redirection's response may contain new cookies, so add cookies again.
+ // Redirection's response may add or update cookies, so we get cookies from CookieManager when redirection happens.
// If there aren't cookies in the header list, we need trying to add cookies.
if (cookiesEnabled && (isRedirect || !httpHeaderFields().contains("Cookie")) && !url().isNull()) {
// Prepare a cookie header if there are cookies related to this url.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes