From cf088201a974f0cf7afd03f0dc4fe27b6c8c2b31 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 Oct 2021 19:44:29 +0200 Subject: [PATCH] c-hyper: make test 217 run Closes #7889 --- lib/c-hyper.c | 6 ++++++ lib/http_proxy.c | 3 ++- tests/data/DISABLED | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/c-hyper.c b/lib/c-hyper.c index 7ce958adba..38071e832d 100644 --- a/lib/c-hyper.c +++ b/lib/c-hyper.c @@ -260,6 +260,12 @@ static CURLcode status_line(struct Curl_easy *data, if(http_version == HYPER_HTTP_VERSION_1_0) data->state.httpwant = CURL_HTTP_VERSION_1_0; + if(data->state.hconnect) + /* CONNECT */ + data->info.httpproxycode = http_status; + + /* We need to set 'httpcodeq' for functions that check the response code in + a single place. */ data->req.httpcode = http_status; result = Curl_http_statusline(data, conn); diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 8fc9c6222b..2969c859da 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -210,6 +210,8 @@ static void connect_done(struct Curl_easy *data) /* restore the protocol pointer */ data->req.p.http = s->prot_save; s->prot_save = NULL; + data->info.httpcode = 0; /* clear it as it might've been used for the + proxy */ infof(data, "CONNECT phase completed!"); } } @@ -964,7 +966,6 @@ static CURLcode CONNECT(struct Curl_easy *data, result = CURLE_OK; if(s->tunnel_state == TUNNEL_COMPLETE) { - data->info.httpproxycode = data->req.httpcode; if(data->info.httpproxycode/100 != 2) { if(conn->bits.close && data->req.newurl) { conn->bits.proxy_connect_closed = TRUE; diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 1f897e4386..687857ad24 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -40,7 +40,6 @@ # hyper support remains EXPERIMENTAL as long as there's a test number # listed below %if hyper -217 262 265 266 -- 2.47.3