From: Daniel Stenberg Date: Fri, 22 Oct 2021 08:57:54 +0000 (+0200) Subject: c-hyper: don't abort CONNECT responses early when auth-in-progress X-Git-Tag: curl-7_80_0~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10883eb98156077a7cb2d86656df54008558f653;p=thirdparty%2Fcurl.git c-hyper: don't abort CONNECT responses early when auth-in-progress ... and make sure to stop ignoring the body once the CONNECT is done. This should make test 206 work proper again and not be flaky. Closes #7889 --- diff --git a/lib/c-hyper.c b/lib/c-hyper.c index 38071e832d..c691544b7b 100644 --- a/lib/c-hyper.c +++ b/lib/c-hyper.c @@ -205,7 +205,8 @@ static int hyper_body_chunk(void *userdata, const hyper_buf *chunk) k->exp100 = EXP100_FAILED; } } - if(data->state.hconnect && (data->req.httpcode/100 != 2)) { + if(data->state.hconnect && (data->req.httpcode/100 != 2) && + data->state.authproxy.done) { done = TRUE; result = CURLE_OK; } diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 2969c859da..5244a25bba 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -212,6 +212,7 @@ static void connect_done(struct Curl_easy *data) s->prot_save = NULL; data->info.httpcode = 0; /* clear it as it might've been used for the proxy */ + data->req.ignorebody = FALSE; infof(data, "CONNECT phase completed!"); } }