aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c22
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)) {