[
https://issues.apache.org/jira/browse/TS-2609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13919230#comment-13919230
]
Leif Hedstrom commented on TS-2609:
-----------------------------------
Hmmm, I see what you are getting at. However, the patch does not do that I'm
pretty sure:
{code}
+ const char *to_host = TSUrlHostGet(res._rri->requestBufp,
res._rri->requestUrl, &to_host_len);
{code}
In your case, with pristine host headers, the requestUrl's Host would still be
x.y.com. To do what you are saying, I believe you would have to change this
code to _rri->mapToUrl. Now, we also have the URL and CLIENT-URL directives,
that might overlap here ? E.g.
{code}
%{URL:Host}
{code}
However, looking at the code, it seems the URL conditions are not implemented
at all. We'll happy take patches here too! :-).
Also, as the patch is written, the TOHOST condition would only work as a remap
rule. That is fine, but would need to be properly documented. And if possible,
we should make conditions and operators generic. But, the more I look at this,
maybe the answer is to finish the URL / CLIENT-URL (and perhaps TO-URL and
FROM-URL ?) conditions ?
What do you think?
> Header rewrite plugin TOHOST condition
> --------------------------------------
>
> Key: TS-2609
> URL: https://issues.apache.org/jira/browse/TS-2609
> Project: Traffic Server
> Issue Type: Improvement
> Components: Plugins
> Reporter: Anil Kumar Myla
> Assignee: Leif Hedstrom
> Priority: Minor
> Fix For: 5.0.0
>
>
> Enhance header rewrite plugin to support TOHOST condition. Header rewrites
> conditioned on the final origin server will be supported.
--
This message was sent by Atlassian JIRA
(v6.2#6252)