|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker mailing list Archives
[ curl-Bugs-1849764 ] libcurl doesn't handle Expect: 100 correctly for some POSTs
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 12 Dec 2007 18:10:30 -0800
Bugs item #1849764, was opened at 2007-12-13 02:10
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
Here is a description of the conditions this can occur:
1. Reuse a connection that was previously used for a PUT or POST with form fields, leaving data->state.expect100header==1
2. Perform a simple post using a CALLBACK (HTTPREQ_POST) and no post fields.
3. expect100() never gets called on the connection. As a result, the Expect: 100-continue header is never sent, but because data->state.expect100header==1 from the previous request, CURL waits for the timeout before sending the POST body.
The fix is relatively simple. The expect100() call is being made only when postfields are present, moving this call outside that check (so it is used for callback posts) as well cause the header to be added properly (or the data->state.expect100header set to false otherwise).
Before:
/* for really small posts we don't use Expect: headers at all, and for
After:
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info