[ 
https://issues.apache.org/jira/browse/TS-3061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14123094#comment-14123094
 ] 

James Peach commented on TS-3061:
---------------------------------

AFAICT, this is a problem that is intrinsic to any handle/body representation. 
The transaction and the plugin both have a handle to the same URL object. Now 
the transaction could easily switch out the URL and have a handle to a 
different URL object. There's no way for the plugin to know if this has 
happened. In fact, for a plugin that wants to preserve the original, unmodified 
URL, the current behavior is desirable.

In short, don't cache it in the plugin.

> API: Cached URL MLocs prevent the HttpSM from detecting Url Changes.
> --------------------------------------------------------------------
>
>                 Key: TS-3061
>                 URL: https://issues.apache.org/jira/browse/TS-3061
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core, CPP API, TS API
>            Reporter: Brian Geffon
>            Assignee: Brian Geffon
>
> The HttpSM contains a cached version of the client request url to avoid 
> re-generating strings repeatedly. The problem is that if a plugin caches the 
> MLoc and MBuf they can modify the URL without the cached copy being updated. 
> Unfortunantely, moving the dirty flag into UrlImpl would be incredibly messy, 
> so I will propose that after api callouts are complete we mark the cached url 
> as dirty. It seems like the only reasonable approach that has minimal 
> performance impact while maintaining the caching.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to