Bug 117344

Summary: [curl] Allow headers with empty value
Product: WebKit Reporter: Peter Gal <galpeter>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue
Priority: P2 Keywords: Curl
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 117300    
Attachments:
Description Flags
patch
none
fixed patch
kenneth: review+
patch with fixes none

Peter Gal
Reported 2013-06-07 06:16:51 PDT
The current usage of the curl backend does not allow headers with empty value. This can be easily fixed just a simple quotes ("") as value instead of an empty string will tell curl that we want it as an empty value.
Attachments
patch (1.53 KB, patch)
2013-06-07 06:21 PDT, Peter Gal
no flags
fixed patch (1.79 KB, patch)
2013-06-07 07:06 PDT, Peter Gal
kenneth: review+
patch with fixes (1.83 KB, patch)
2013-06-08 04:42 PDT, Peter Gal
no flags
Peter Gal
Comment 1 2013-06-07 06:21:51 PDT
Peter Gal
Comment 2 2013-06-07 06:40:57 PDT
Comment on attachment 204036 [details] patch soo... it seems this is not my day it seems curl doesn't do what it says on it's own documentation page. But still with that patch some test cases passed :) I'll deliver a better patch.
Peter Gal
Comment 3 2013-06-07 07:06:57 PDT
Created attachment 204041 [details] fixed patch Not this'll work as intended.
Kenneth Rohde Christiansen
Comment 4 2013-06-08 04:18:26 PDT
Comment on attachment 204041 [details] fixed patch View in context: https://bugs.webkit.org/attachment.cgi?id=204041&action=review > Source/WebCore/ChangeLog:11 > + No new tests, alread covered by: > + http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html > + http/tests/xmlhttprequest/post-blob-content-type-sync.html > + no updated results? > Source/WebCore/platform/network/curl/ResourceHandleManager.cpp:758 > + // insert the ; to tell curl that this header has an empty value Nit: Use real sentences: "Insert" and punctuation mark at end.
Peter Gal
Comment 5 2013-06-08 04:41:05 PDT
(In reply to comment #4) > (From update of attachment 204041 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=204041&action=review > > > Source/WebCore/ChangeLog:11 > > + No new tests, alread covered by: > > + http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html > > + http/tests/xmlhttprequest/post-blob-content-type-sync.html > > + > > no updated results? No need for that. With this patch the test executes as expected. > > > Source/WebCore/platform/network/curl/ResourceHandleManager.cpp:758 > > + // insert the ; to tell curl that this header has an empty value > > Nit: Use real sentences: "Insert" and punctuation mark at end. Okay, will post the update in a minute.
Peter Gal
Comment 6 2013-06-08 04:42:25 PDT
Created attachment 204088 [details] patch with fixes updated the patch based on the previous comment.
Brent Fulgham
Comment 7 2013-06-08 14:12:51 PDT
Comment on attachment 204088 [details] patch with fixes r=me.
WebKit Commit Bot
Comment 8 2013-06-08 14:33:43 PDT
Comment on attachment 204088 [details] patch with fixes Clearing flags on attachment: 204088 Committed r151348: <http://trac.webkit.org/changeset/151348>
WebKit Commit Bot
Comment 9 2013-06-08 14:33:45 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.