Skip to content

Commit cd76df8

Browse files
maskitzwoop
authored andcommitted
Preserve unmapped url regardless of need for remapping (#10304)
(cherry picked from commit 1952751)
1 parent f6df310 commit cd76df8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

proxy/http/HttpSM.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4224,9 +4224,6 @@ HttpSM::do_remap_request(bool run_inline)
42244224

42254225
check_sni_host();
42264226

4227-
// Preserve effective url before remap
4228-
t_state.unmapped_url.create(t_state.hdr_info.client_request.url_get()->m_heap);
4229-
t_state.unmapped_url.copy(t_state.hdr_info.client_request.url_get());
42304227
// Depending on a variety of factors the HOST field may or may not have been promoted to the
42314228
// client request URL. The unmapped URL should always have that promotion done. If the HOST field
42324229
// is not already there, promote it only in the unmapped_url. This avoids breaking any logic that

proxy/http/HttpTransact.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,10 @@ HttpTransact::HandleBlindTunnel(State *s)
951951
void
952952
HttpTransact::StartRemapRequest(State *s)
953953
{
954+
// Preserve effective url before remap, regardless of actual need for remap
955+
s->unmapped_url.create(s->hdr_info.client_request.url_get()->m_heap);
956+
s->unmapped_url.copy(s->hdr_info.client_request.url_get());
957+
954958
if (s->api_skip_all_remapping) {
955959
TxnDebug("http_trans", "API request to skip remapping");
956960

0 commit comments

Comments
 (0)