This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit cd76df895587017fb2072806487984ca72bfbebf Author: Masakazu Kitajo <[email protected]> AuthorDate: Tue Sep 12 08:14:04 2023 +0900 Preserve unmapped url regardless of need for remapping (#10304) (cherry picked from commit 195275111242eff00428b595a78984a5a0c7c39a) --- proxy/http/HttpSM.cc | 3 --- proxy/http/HttpTransact.cc | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index d63aeb1b87..6b3ef19a28 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -4224,9 +4224,6 @@ HttpSM::do_remap_request(bool run_inline) check_sni_host(); - // Preserve effective url before remap - t_state.unmapped_url.create(t_state.hdr_info.client_request.url_get()->m_heap); - t_state.unmapped_url.copy(t_state.hdr_info.client_request.url_get()); // Depending on a variety of factors the HOST field may or may not have been promoted to the // client request URL. The unmapped URL should always have that promotion done. If the HOST field // is not already there, promote it only in the unmapped_url. This avoids breaking any logic that diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index b1095be30d..ea7b54c751 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -951,6 +951,10 @@ HttpTransact::HandleBlindTunnel(State *s) void HttpTransact::StartRemapRequest(State *s) { + // Preserve effective url before remap, regardless of actual need for remap + s->unmapped_url.create(s->hdr_info.client_request.url_get()->m_heap); + s->unmapped_url.copy(s->hdr_info.client_request.url_get()); + if (s->api_skip_all_remapping) { TxnDebug("http_trans", "API request to skip remapping");
