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
This commit is contained in:
Daniel Stenberg 2021-10-22 10:57:54 +02:00
parent 1732502cb0
commit 10883eb981
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 3 additions and 1 deletions

View 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;
}

View 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!");
}
}