Bug 117344 - [curl] Allow headers with empty value
Summary: [curl] Allow headers with empty value
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Curl
Depends on:
Blocks: 117300
  Show dependency treegraph
 
Reported: 2013-06-07 06:16 PDT by Peter Gal
Modified: 2013-06-08 14:33 PDT (History)
2 users (show)

See Also:


Attachments
patch (1.53 KB, patch)
2013-06-07 06:21 PDT, Peter Gal
no flags Details | Formatted Diff | Diff
fixed patch (1.79 KB, patch)
2013-06-07 07:06 PDT, Peter Gal
kenneth: review+
Details | Formatted Diff | Diff
patch with fixes (1.83 KB, patch)
2013-06-08 04:42 PDT, Peter Gal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gal 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.
Comment 1 Peter Gal 2013-06-07 06:21:51 PDT
Created attachment 204036 [details]
patch
Comment 2 Peter Gal 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.
Comment 3 Peter Gal 2013-06-07 07:06:57 PDT
Created attachment 204041 [details]
fixed patch

Not this'll work as intended.
Comment 4 Kenneth Rohde Christiansen 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.
Comment 5 Peter Gal 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.
Comment 6 Peter Gal 2013-06-08 04:42:25 PDT
Created attachment 204088 [details]
patch with fixes

updated the patch based on the previous comment.
Comment 7 Brent Fulgham 2013-06-08 14:12:51 PDT
Comment on attachment 204088 [details]
patch with fixes

r=me.
Comment 8 WebKit Commit Bot 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>
Comment 9 WebKit Commit Bot 2013-06-08 14:33:45 PDT
All reviewed patches have been landed.  Closing bug.