TS-2792 Large request header causes unexpected remap.

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

Branch: refs/heads/5.0.x
Commit: e8b88aff8a5cc2c23161e2cf1e33d3ee4ddc401e
Parents: 715e4a2
Author: Masakazu Kitajo <[email protected]>
Authored: Fri May 30 10:48:08 2014 -0600
Committer: Leif Hedstrom <[email protected]>
Committed: Fri May 30 10:54:12 2014 -0600

----------------------------------------------------------------------
 CHANGES                        | 3 +++
 proxy/http/remap/UrlRewrite.cc | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e8b88aff/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index dc132b3..49cfaf4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-2792] Large request header causes unexpected remap.
+   Author: Masakazu Kitajo <[email protected]>
+
   *) [TS-2834] header_rewrite: Add Internal transaction and client-IP
    conditions.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e8b88aff/proxy/http/remap/UrlRewrite.cc
----------------------------------------------------------------------
diff --git a/proxy/http/remap/UrlRewrite.cc b/proxy/http/remap/UrlRewrite.cc
index e2d15ee..7a7bb73 100644
--- a/proxy/http/remap/UrlRewrite.cc
+++ b/proxy/http/remap/UrlRewrite.cc
@@ -299,7 +299,6 @@ url_rewrite_remap_request(const UrlMappingContainer& 
mapping_container, URL *req
   int toHostLen;
   int toSchemeLen;
 
-  requestPath = request_url->path_get(&requestPathLen);
   map_from->path_get(&fromPathLen);
 
   toHost = map_to->host_get(&toHostLen);
@@ -312,6 +311,8 @@ url_rewrite_remap_request(const UrlMappingContainer& 
mapping_container, URL *req
   request_url->port_set(map_to->port_get_raw());
   request_url->scheme_set(toScheme, toSchemeLen);
 
+  requestPath = request_url->path_get(&requestPathLen);
+
   // Should be +3, little extra padding won't hurt. Use the stack allocation
   // for better performance (bummer that arrays of variable length is not 
supported
   // on Solaris CC.

Reply via email to