[
https://issues.apache.org/jira/browse/TS-507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alan M. Carroll resolved TS-507.
--------------------------------
Resolution: Fixed
I applied the patch, which fixes the problem for known uses. It's not a
complete fix. The problem can still occur if a plugin carries state between
callbacks (e.g., gets a URL object in one callback, caches it, and then uses it
in another callback for that transaction). I consider that use case
sufficiently unlikely to be tolerable for a point release.
A full fix will require significantly more work. The problem is that HTTPHdr
class needs tgo cache the URL text for performance reasons, but the plugin API
returns the underlyilng HTTDHdrImpl instance, bypassing the wrapper class.
Beyond that it can also return the raw URL object, bypassing even the
HTTPHdrImpl class. A full solution would be to force the API to go through the
HTTPHdr class, even when it was putatively returning a URL instance, or to keep
generation numbers in the HTTPHdrImpl and URLImpl classes which could be
checked by caching logic in the wrapper classes. My personal opinion is that
exposing the internal workings of a wrapper class is a Bad Thing and should be
changed. But that's not a simple change.
> INKUrlHostSet does not work in INK_HTTP_READ_REQUEST_PRE_REMAP_HOOK
> -------------------------------------------------------------------
>
> Key: TS-507
> URL: https://issues.apache.org/jira/browse/TS-507
> Project: Traffic Server
> Issue Type: Bug
> Affects Versions: 2.1.3
> Reporter: Leif Hedstrom
> Assignee: Alan M. Carroll
> Fix For: 2.1.4
>
> Attachments: test.cc, ts-507-patch.txt
>
>
> As of the transparent proxy merge (TS-291, SVN commit # 992187), the attached
> code (see separate attachment) does not long work. Basically, the plugin is
> intended to run instead of a "remap" rule, in a
> INK_HTTP_READ_REQUEST_PRE_REMAP_HOOK. With versions of ATS before this TS-291
> commit, it works fine (it'll set the URL and Host: header properly), but
> after this commit, it breaks.
> Going back to earlier ATS versions do not show this problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.