You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2010/08/27 20:34:15 UTC
svn commit: r990224 - in /trafficserver/traffic/trunk/proxy/http2: HttpSM.cc
HttpTransact.h
Author: bcall
Date: Fri Aug 27 18:34:14 2010
New Revision: 990224
URL: http://svn.apache.org/viewvc?rev=990224&view=rev
Log:
TS-414 Update so the pristine URL will work for reverse and forward
proxy. Also, clearing the url on transaction close.
Modified:
trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
trafficserver/traffic/trunk/proxy/http2/HttpTransact.h
Modified: trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc?rev=990224&r1=990223&r2=990224&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpSM.cc Fri Aug 27 18:34:14 2010
@@ -843,11 +843,6 @@ HttpSM::state_read_client_request_header
if (HttpConfig::m_master.number_of_redirections)
enable_redirection = HttpConfig::m_master.redirection_enabled;
- // Preserve pristine url before remap
- t_state.pristine_url.create(t_state.hdr_info.client_request.url_get()->m_heap);
- t_state.pristine_url.copy(t_state.hdr_info.client_request.url_get());
-
-
call_transact_and_set_next_state(HttpTransact::ModifyRequest);
break;
@@ -3830,6 +3825,12 @@ HttpSM::do_remap_request(bool run_inline
bool ret = remapProcessor.setup_for_remap(&t_state);
+ // Preserve pristine url before remap
+ // This needs to be done after the Host: header for reverse proxy is added to the url, but
+ // before we return from this function for forward proxy
+ t_state.pristine_url.create(t_state.hdr_info.client_request.url_get()->m_heap);
+ t_state.pristine_url.copy(t_state.hdr_info.client_request.url_get());
+
if (!ret) {
Debug("url_rewrite", "Could not find a valid remapping entry for this request [%lld]", sm_id);
if (!run_inline) {
Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.h?rev=990224&r1=990223&r2=990224&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.h Fri Aug 27 18:34:14 2010
@@ -1519,7 +1519,7 @@ HttpTransact::State::destroy()
url_map.clear();
arena.reset();
-
+ pristine_url.clear();
return;
}