bryancall commented on issue #6588:
URL: https://github.com/apache/trafficserver/issues/6588#issuecomment-4827338722

   I looked at this against current master. The behavior described is by design 
and still in place. For a regex_map rule, the from URL is parsed into discrete 
components: the scheme, port, and path are compared as exact fields, while the 
regular expression is applied only to the host portion of the request (see 
src/proxy/http/remap/UrlRewrite.cc, the _regexMappingLookup routine). In your 
example, regex_map http://(.*):8080 http://$1:8080, the :8080 is treated as the 
port field and matched exactly, and (.*) matches only the host, so the rule 
does correctly remap requests on port 8080 while leaving other ports alone. 
Making the regular expression match the entire request line (including the 
port) would be a semantics change to the remap engine rather than a bug fix, 
and there is no pull request implementing it. Given that this has been open and 
inactive for over five years with no follow-up, I am closing it as working as 
designed. If matching the full request line is still wanted, a fr
 esh feature request describing the desired behavior and use case would be the 
better path.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to