Repository: trafficserver
Updated Branches:
  refs/heads/master 82ccbcb4b -> ef6d97239


[TS-3500]: Fix TSHttpTxnPristineUrlGet to return client request's url
           when pristine url is not populated


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/19ee9556
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/19ee9556
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/19ee9556

Branch: refs/heads/master
Commit: 19ee9556efe6f8e60208c15e32822b6cd31ebce6
Parents: 82ccbcb
Author: Sudheer Vinukonda <[email protected]>
Authored: Thu Apr 9 17:51:39 2015 +0000
Committer: Sudheer Vinukonda <[email protected]>
Committed: Thu Apr 9 17:52:49 2015 +0000

----------------------------------------------------------------------
 proxy/InkAPI.cc            | 10 ++++++++--
 proxy/http/HttpTransact.cc |  2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/19ee9556/proxy/InkAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index aca133b..c3269f8 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -4570,8 +4570,14 @@ TSHttpTxnPristineUrlGet(TSHttpTxn txnp, TSMBuffer *bufp, 
TSMLoc *url_loc)
     *(reinterpret_cast<HTTPHdr **>(bufp)) = hptr;
     *url_loc = (TSMLoc)sm->t_state.pristine_url.m_url_impl;
 
-    if ((sdk_sanity_check_mbuffer(*bufp) == TS_SUCCESS) && (*url_loc))
-      return TS_SUCCESS;
+    if (sdk_sanity_check_mbuffer(*bufp) == TS_SUCCESS) {
+      if (*url_loc == NULL) {
+        *url_loc = (TSMLoc)hptr->m_http->u.req.m_url_impl;
+      }
+      if (*url_loc) {
+        return TS_SUCCESS;
+      }
+    }
   }
   return TS_ERROR;
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/19ee9556/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 5f1a782..a738282 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -682,6 +682,8 @@ HttpTransact::StartRemapRequest(State *s)
   if (s->api_skip_all_remapping) {
     Debug("http_trans", "API request to skip remapping");
 
+    s->hdr_info.client_request.set_url_target_from_host_field();
+
     if (s->is_upgrade_request && s->post_remap_upgrade_return_point) {
       TRANSACT_RETURN(SM_ACTION_POST_REMAP_SKIP, 
s->post_remap_upgrade_return_point);
     }

Reply via email to