Re: Proposed new ts api calls

2018-02-01 Thread James Peach
> On Jan 30, 2018, at 9:15 AM, Walt Karas wrote: > > Revised: > > const char *TSRemapFromUrlStringGet(const TSHttpTxn txnp, int &length); > > const char *TSRemapToUrlStringGet(const TSHttpTxn txnp, int &length); > > These would return, from the transaction state object, > url_map.getFromURL(

Re: Proposed new ts api calls

2018-02-01 Thread Alan Carroll
That's a good suggestion, although shouldn't it be TSReturnCode TSRemapFromUrlGet(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc* obj); That is the TSMLoc should be an out parameter, not an in. In that case I'd drop the ...StringGet() and use the generic TSUrlStringGet() if a string is needed.

Re: Proposed new ts api calls

2018-02-01 Thread Walt Karas
When calling this, where would the value for the bufp parameter come from? How would it be used in the implementation? On Thu, Feb 1, 2018 at 10:35 AM, Alan Carroll wrote: > That's a good suggestion, although shouldn't it be > > TSReturnCode TSRemapFromUrlGet(TSHttpTxn txnp, TSMBuffer bufp, TSML

Re: Proposed new ts api calls

2018-02-01 Thread Leif Hedstrom
> On Feb 1, 2018, at 9:35 AM, Alan Carroll > wrote: > > That's a good suggestion, although shouldn't it be > > TSReturnCode TSRemapFromUrlGet(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc* obj); > > That is the TSMLoc should be an out parameter, not an in. In that case I'd > drop the ...StringGet()