]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
c-hyper: deal with Expect: 100-continue combined with POSTFIELDS
authorDaniel Stenberg <daniel@haxx.se>
Mon, 23 Aug 2021 11:04:59 +0000 (13:04 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 23 Aug 2021 14:10:15 +0000 (16:10 +0200)
Enable test 1130 and 1131

Closes #7616

lib/c-hyper.c
tests/data/DISABLED

index 5cb04bb3e121c594c36d62cc4d6894874299d1d0..f17180bc8619c605e2ad483b71078e71b9b4e6e1 100644 (file)
@@ -203,11 +203,9 @@ static int hyper_body_chunk(void *userdata, const hyper_buf *chunk)
       }
       else { /* >= 4xx */
         k->exp100 = EXP100_FAILED;
-        done = TRUE;
       }
     }
-    if(data->state.hconnect &&
-       (data->req.httpcode/100 != 2)) {
+    if(data->state.hconnect && (data->req.httpcode/100 != 2)) {
       done = TRUE;
       result = CURLE_OK;
     }
@@ -596,6 +594,16 @@ static int uploadpostfields(void *userdata, hyper_context *ctx,
 {
   struct Curl_easy *data = (struct Curl_easy *)userdata;
   (void)ctx;
+  if(data->req.exp100 > EXP100_SEND_DATA) {
+    if(data->req.exp100 == EXP100_FAILED)
+      return HYPER_POLL_ERROR;
+
+    /* still waiting confirmation */
+    if(data->hyp.exp100_waker)
+      hyper_waker_free(data->hyp.exp100_waker);
+    data->hyp.exp100_waker = hyper_context_waker(ctx);
+    return HYPER_POLL_PENDING;
+  }
   if(data->req.upload_done)
     *chunk = NULL; /* nothing more to deliver */
   else {
index d5f1b7087cef443a1c07d5112ec39c778b889f24..301de6c70a5b5f3a13953eb57879c481fa1e6301 100644 (file)
@@ -78,8 +78,6 @@
 1123
 1125
 1129
-1130
-1131
 1144
 1156
 1160