diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-12-13 10:00:06 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-12-13 10:00:06 +0000 |
commit | 7b1a22147e97e06316ca8707d6177fa9187d7550 (patch) | |
tree | 740ddd65cbb93641232e2127a07e4f4fd0994da9 /lib | |
parent | dc24540ed1abaed66ff93ffcd5f603bd870926f1 (diff) |
David Wright filed bug report #1849764
(http://curl.haxx.se/bug/view.cgi?id=1849764) with an included fix. He
identified a problem for re-used connections that previously had sent
Expect: 100-continue and in some situations the subsequent POST (that didn't
use Expect:) still had the internal flag set for its use. David's fix (that
makes the setting of the flag in every single request unconditionally) is
fine and is now used!
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/http.c b/lib/http.c index 7f3ff35a3..e41a8f750 100644 --- a/lib/http.c +++ b/lib/http.c @@ -2613,17 +2613,19 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) return result; } - if(data->set.postfields) { + /* For really small posts we don't use Expect: headers at all, and for + the somewhat bigger ones we allow the app to disable it. Just make + sure that the expect100header is always set to the preferred value + here. */ + if(postsize > TINY_INITIAL_POST_SIZE) { + result = expect100(data, req_buffer); + if(result) + return result; + } + else + data->state.expect100header = FALSE; - /* for really small posts we don't use Expect: headers at all, and for - the somewhat bigger ones we allow the app to disable it */ - if(postsize > TINY_INITIAL_POST_SIZE) { - result = expect100(data, req_buffer); - if(result) - return result; - } - else - data->state.expect100header = FALSE; + if(data->set.postfields) { if(!data->state.expect100header && (postsize < MAX_INITIAL_POST_SIZE)) { |