]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
c-hyper: make test 217 run
authorDaniel Stenberg <daniel@haxx.se>
Thu, 21 Oct 2021 17:44:29 +0000 (19:44 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 Oct 2021 10:54:00 +0000 (12:54 +0200)
Closes #7889

lib/c-hyper.c
lib/http_proxy.c
tests/data/DISABLED

index 7ce958adbaba44d68fb963918fcf7f5cd10081e2..38071e832d3d593adecc09e1ace23fe598ba374f 100644 (file)
@@ -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);
index 8fc9c6222bc2faebaa56377ee61a74a5291c73f5..2969c859daced5c34a8fe2fc9ce0690f8a600d18 100644 (file)
@@ -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;
index 1f897e4386fc115e03f5ad4555c73ec0bd2722e6..687857ad24fb34d06af168a88f5d7207d93cc40c 100644 (file)
@@ -40,7 +40,6 @@
 # hyper support remains EXPERIMENTAL as long as there's a test number
 # listed below
 %if hyper
-217
 262
 265
 266