summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-08-23 13:04:59 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-08-23 13:06:13 +0200
commita22d143d2cd272ea6b3f3aa12e8f7af745a09d95 (patch)
tree3d9bcf0b288098dee90f08b7b6e003f3541e7f2d /lib
parent473b893c7e3be0cfd6a050723ccdaea53e88cafb (diff)
downloadcurl-bagder/hyper-postfields-1xx.tar.gz
c-hyper: deal with Expect: 100-continue combined with POSTFIELDSbagder/hyper-postfields-1xx
Enable test 1130 and 1131
Diffstat (limited to 'lib')
-rw-r--r--lib/c-hyper.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/c-hyper.c b/lib/c-hyper.c
index 5cb04bb3e..f17180bc8 100644
--- a/lib/c-hyper.c
+++ b/lib/c-hyper.c
@@ -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 {