mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:23:33 +03:00
Fixed a flaw in the "Expect: 100-continue" treatment. If you did two POSTs
on a persistent connection and allowed the first to use that header, you could not disable it for the second request.
This commit is contained in:
parent
c410769588
commit
a4ebf5b507
5 changed files with 21 additions and 21 deletions
|
|
@ -1516,6 +1516,8 @@ static CURLcode expect100(struct SessionHandle *data,
|
|||
send_buffer *req_buffer)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
data->state.expect100header = FALSE; /* default to false unless it is set
|
||||
to TRUE below */
|
||||
if((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
||||
!checkheaders(data, "Expect:")) {
|
||||
/* if not doing HTTP 1.0 or disabled explicitly, we add a Expect:
|
||||
|
|
@ -1525,7 +1527,7 @@ static CURLcode expect100(struct SessionHandle *data,
|
|||
result = add_bufferf(req_buffer,
|
||||
"Expect: 100-continue\r\n");
|
||||
if(result == CURLE_OK)
|
||||
data->set.expect100header = TRUE;
|
||||
data->state.expect100header = TRUE;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue