diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2006-08-08 21:12:49 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2006-08-08 21:12:49 +0000 | 
| commit | a4ebf5b507490ceac7d741c4462ad162629a4bae (patch) | |
| tree | 83c14d2d9e1160754d9bc5828e3cfedcb19cae74 /lib/http.c | |
| parent | c41076958835c3de6abbfea4b68a9a0b045e9b21 (diff) | |
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.
Diffstat (limited to 'lib/http.c')
| -rw-r--r-- | lib/http.c | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c index 512b17312..310c0a617 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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;  }  | 
