[BlackBerry] Headers with no content shouldn't be dropped by platform's request.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Mar 2012 02:36:35 +0000 (02:36 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Mar 2012 02:36:35 +0000 (02:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82691

Patch by Jason Liu <jason.liu@torchmobile.com.cn> on 2012-03-30
Reviewed by Rob Buis.

Test : http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html

* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112764 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp

index b2149e2..eb49b96 100644 (file)
@@ -1,3 +1,15 @@
+2012-03-30  Jason Liu  <jason.liu@torchmobile.com.cn>
+
+        [BlackBerry] Headers with no content shouldn't be dropped by platform's request.
+        https://bugs.webkit.org/show_bug.cgi?id=82691
+
+        Reviewed by Rob Buis.
+
+        Test : http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
+
+        * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
+        (WebCore::ResourceRequest::initializePlatformRequest):
+
 2012-03-30  Eric Seidel  <eric@webkit.org>
 
         Add tests for iframe seamless and support for parsing webkitseamless attribute
index 2f29f01..24e56db 100644 (file)
@@ -152,7 +152,7 @@ void ResourceRequest::initializePlatformRequest(NetworkRequest& platformRequest,
         for (HTTPHeaderMap::const_iterator it = httpHeaderFields().begin(); it != httpHeaderFields().end(); ++it) {
             String key = it->first;
             String value = it->second;
-            if (!key.isEmpty() && !value.isEmpty()) {
+            if (!key.isEmpty()) {
                 // We need to check the encoding and encode the cookie's value using latin1 or utf8 to support unicode characters.
                 // We wo't use the old cookies of resourceRequest for new location because these cookies may be changed by redirection.
                 if (!equalIgnoringCase(key, "Cookie"))