From 4d3a308014be26e5407113b4c827a1ea2882bf38 Mon Sep 17 00:00:00 2001
From: Yann Ylavic <ylavic@apache.org>
Date: Wed, 26 Jun 2024 00:28:32 +0000
Subject: [PATCH] mod_proxy_http2: ap_proxy_determine_connection()'s given &url
 is in/out.

* modules/http2/mod_proxy_http2.c(proxy_http2_handler):
  Restart from the original URL on reconnect.

Merges r1918627 from trunk (experimental/CTR).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1918628 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/modules/http2/mod_proxy_http2.c b/modules/http2/mod_proxy_http2.c
index 5eb8b51..893b47f 100644
--- a/modules/http2/mod_proxy_http2.c
+++ b/modules/http2/mod_proxy_http2.c
@@ -303,7 +303,7 @@ static int proxy_http2_handler(request_rec *r,
                                apr_port_t proxyport)
 {
     const char *proxy_func, *task_id;
-    char *locurl = url, *u;
+    char *locurl, *u;
     apr_size_t slen;
     int is_ssl = 0;
     apr_status_t status;
@@ -372,6 +372,7 @@ run_connect:
         goto cleanup;
     }
 
+    locurl = url;
     ctx->p_conn->is_ssl = ctx->is_ssl;
 
     /* Step One: Determine the URL to connect to (might be a proxy),
