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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user