[
https://issues.apache.org/jira/browse/TS-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14569438#comment-14569438
]
James Peach commented on TS-3652:
---------------------------------
I don't think that we should allow arbitrary flexibility; it's better to
choose a simple policy and enforce that. I agree that the plugin should have to
reset the cache key if the core follows redirects. It's very common for cache
key modifications to take the existing path and just munge that a little.
We should fix the {{TSCacheUrl}} bug that [~Sudheer] mentions. That's a little
subtle, since setting the cache URL should still fail if it is done after the
cache lookup. And the core should *not* be ignoring the modified cache key when
follofinw redirects :)
Ad much as possible, I think that following redirects should be modeled to
plugins as if it was a brand new transaction. That's a simple model, and easy
for plugins to deal with. If you think about following redirects as a series of
(related) transactions, then the expected behavior becomes pretty clear.
> During 3xx redirect follow, TS uses the redirect url as the cache key
> ignoring any cache key set via API
> --------------------------------------------------------------------------------------------------------
>
> Key: TS-3652
> URL: https://issues.apache.org/jira/browse/TS-3652
> Project: Traffic Server
> Issue Type: Bug
> Components: HTTP
> Reporter: Sudheer Vinukonda
>
> Currently, during 3xx redirect follow, TS uses the redirect url (as received
> in the *Location* header of the 3xx response) as the cache key for storing
> the subsequent response to the redirect follow request. This works fine in
> most cases, since, the original client request would have cached the 3xx
> response and the final response would still be derived using the redirect
> follow url. This also allows direct requests to the redirect follow location
> be served from the cache efficiently.
> However, this is not desirable in some cases, especially when there's a TS
> API (plugin) modifying the cache key and wanting to store the final response
> against the modified cache key directly.
> Proposing to add a config setting to allow storing API set cache key during
> redirect follow.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)