Bug 111844 - [Curl] POST requests sometimes fail.
Summary: [Curl] POST requests sometimes fail.
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL: https://bugs.webkit.org/
Keywords: Curl
Depends on:
Reported: 2013-03-08 04:27 PST by peavo
Modified: 2013-05-07 12:34 PDT (History)
4 users (show)

See Also:

Patch (1.66 KB, patch)
2013-03-08 04:38 PST, peavo
no flags Details | Formatted Diff | Diff
Patch (4.00 KB, patch)
2013-05-07 07:09 PDT, peavo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 2013-03-08 04:27:59 PST
Curl adds the header 'Expect: 100-Continue' when sending a POST request.
When we receive the header 'HTTP/1.1 100 Continue' we should not call
ResourceHandleClient::didReceiveResponse(), as the request might be
cancelled because the MIME type is empty in this case.
Comment 1 peavo 2013-03-08 04:38:18 PST
Created attachment 192200 [details]
Comment 2 peavo 2013-03-12 07:14:50 PDT
A good way to reproduce this, is to create a new bug at https://bugs.webkit.org/.
When clicking the commit button after filling in the various fields, the POST request sent is always failing for me.
Comment 3 peavo 2013-05-07 07:09:17 PDT
Created attachment 200899 [details]
Comment 4 peavo 2013-05-07 07:17:38 PDT
Modified the patch slightly, inspired by the blackberry port.
The blackberry port also ignores http code 100 (and other info codes),
see the method NetworkJob::handleNotifyStatusReceived() in
The blackberry port also doesn't classify http code 304 (Not modified)
as a redirect. I did the same thing for Curl, now the 304 code is reported
as a response (ResourceHandleClient::didReceiveResponse() is called).
Comment 5 Brent Fulgham 2013-05-07 08:26:09 PDT
Comment on attachment 200899 [details]

Looks great!
Comment 6 WebKit Commit Bot 2013-05-07 08:52:47 PDT
Comment on attachment 200899 [details]

Clearing flags on attachment: 200899

Committed r149672: <http://trac.webkit.org/changeset/149672>
Comment 7 WebKit Commit Bot 2013-05-07 08:52:49 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 peavo 2013-05-07 12:34:17 PDT
(In reply to comment #5)
> (From update of attachment 200899 [details])
> Looks great!

Thanks for the review ;)