Title: [109783] trunk/Source/WebCore
- Revision
- 109783
- Author
- rwlb...@webkit.org
- Date
- 2012-03-05 12:28:18 -0800 (Mon, 05 Mar 2012)
Log Message
[BlackBerry] UTF chars printed back from cookie through php shows as ???
https://bugs.webkit.org/show_bug.cgi?id=80307
Reviewed by Antonio Gomes.
PR: 130055
we need to check the cookies encoding first and encode the cookie header data
to pass to the request.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109782 => 109783)
--- trunk/Source/WebCore/ChangeLog 2012-03-05 20:15:29 UTC (rev 109782)
+++ trunk/Source/WebCore/ChangeLog 2012-03-05 20:28:18 UTC (rev 109783)
@@ -1,3 +1,18 @@
+2012-03-05 Rob Buis <rb...@rim.com>
+
+ [BlackBerry] UTF chars printed back from cookie through php shows as ???
+ https://bugs.webkit.org/show_bug.cgi?id=80307
+
+ Reviewed by Antonio Gomes.
+
+ PR: 130055
+
+ we need to check the cookies encoding first and encode the cookie header data
+ to pass to the request.
+
+ * platform/network/blackberry/NetworkManager.cpp:
+ (WebCore::NetworkManager::startJob):
+
2012-03-05 Dana Jansens <dan...@chromium.org>
[chromium] Remove old cleanupResources() code
Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkManager.cpp (109782 => 109783)
--- trunk/Source/WebCore/platform/network/blackberry/NetworkManager.cpp 2012-03-05 20:15:29 UTC (rev 109782)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkManager.cpp 2012-03-05 20:28:18 UTC (rev 109783)
@@ -122,9 +122,8 @@
// Prepare a cookie header if there are cookies related to this url.
String cookiePairs = cookieManager().getCookie(url, WithHttpOnlyCookies);
if (!cookiePairs.isEmpty()) {
- // We encode the cookie header data using utf8 to support unicode characters.
- // For more information, look at RFC5987 - 4.1 (http://tools.ietf.org/html/rfc5987#ref-ISO-8859-1).
- platformRequest.setCookieData(cookiePairs.utf8().data());
+ // We need to check the encoding and encode the cookie header data using latin1 or utf8 to support unicode characters.
+ platformRequest.setCookieData(cookiePairs.containsOnlyLatin1() ? cookiePairs.latin1().data() : cookiePairs.utf8().data());
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes