]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
c-hyper: don't abort CONNECT responses early when auth-in-progress
authorDaniel Stenberg <daniel@haxx.se>
Fri, 22 Oct 2021 08:57:54 +0000 (10:57 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 Oct 2021 10:54:12 +0000 (12:54 +0200)
... 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

lib/c-hyper.c
lib/http_proxy.c

index 38071e832d3d593adecc09e1ace23fe598ba374f..c691544b7ba5825aeb9d8c2a9acecda21c3d29d3 100644 (file)
@@ -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;
     }
index 2969c859daced5c34a8fe2fc9ce0690f8a600d18..5244a25bba5f088cfb1c52b6c4ad25d0631c5214 100644 (file)
@@ -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!");
   }
 }