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:
Daniel Stenberg
2006-08-08 21:12:49 +00:00
parent c410769588
commit a4ebf5b507
5 changed files with 21 additions and 21 deletions

View File

@@ -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;
}