Title: [151348] trunk/Source/WebCore
Revision
151348
Author
[email protected]
Date
2013-06-08 14:33:40 -0700 (Sat, 08 Jun 2013)

Log Message

[curl] Allow headers with empty value
https://bugs.webkit.org/show_bug.cgi?id=117344

Patch by Peter Gal <[email protected]> on 2013-06-08
Reviewed by Brent Fulgham.

No new tests, already covered by:
http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
http/tests/xmlhttprequest/post-blob-content-type-sync.html

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151347 => 151348)


--- trunk/Source/WebCore/ChangeLog	2013-06-08 20:36:44 UTC (rev 151347)
+++ trunk/Source/WebCore/ChangeLog	2013-06-08 21:33:40 UTC (rev 151348)
@@ -1,5 +1,19 @@
 2013-06-08  Peter Gal  <[email protected]>
 
+        [curl] Allow headers with empty value
+        https://bugs.webkit.org/show_bug.cgi?id=117344
+
+        Reviewed by Brent Fulgham.
+
+        No new tests, already covered by:
+        http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
+        http/tests/xmlhttprequest/post-blob-content-type-sync.html
+
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::ResourceHandleManager::initializeHandle):
+
+2013-06-08  Peter Gal  <[email protected]>
+
         [curl] Handling of blob elements is incorrect
         https://bugs.webkit.org/show_bug.cgi?id=117301
 

Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp (151347 => 151348)


--- trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp	2013-06-08 20:36:44 UTC (rev 151347)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp	2013-06-08 21:33:40 UTC (rev 151348)
@@ -761,8 +761,13 @@
             String key = it->key;
             String value = it->value;
             String headerString(key);
-            headerString.append(": ");
-            headerString.append(value);
+            if (value.isEmpty())
+                // Insert the ; to tell curl that this header has an empty value.
+                headerString.append(";");
+            else {
+                headerString.append(": ");
+                headerString.append(value);
+            }
             CString headerLatin1 = headerString.latin1();
             headers = curl_slist_append(headers, headerLatin1.data());
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to