> On Jan 29, 2018, at 11:02 AM, Walt Karas <wka...@oath.com.INVALID> wrote:
> 
> const char *TSIRemapFromUrlStringGet(const TSHttpTxn txnp);
> 
> const char *TSIRemapToUrlStringGet(const TSHttpTxn txnp);
> 
> These would return, from the transaction state object,
> url_map.getFromURL() and url_map.getToURL() respectively, in strong
> format.  A null pointer would be returned if the values were empty.


Why is this needed?

In a remap plugin, you have the to and from URLs already, so this would not be 
needed at all (just call TSUrlStringGet() on those parameters). In a regular 
plugin (continuation), I think we don’t have an API to get the To and From 
URLs, but if so, it feels like what we really need is something like

        rule = TSHttpRemapRuleGet(txnp);

and from there

        toURLString = TSUrlStringGet(rule->toUrl);


Or some such. Not sure if we’d expose a struct like this, or make it an opaque 
handler and have getters on it, that is implementation details.

— Leif

Reply via email to