You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by James Peach <jp...@apache.org> on 2012/02/24 07:01:25 UTC

remapping a URL from a plugin

Hey all,

Is there a plugin API that will remap a URL according to the configured remap policy/rules?

J

Re: remapping a URL from a plugin

Posted by James Peach <ja...@me.com>.
On 26/02/2012, at 11:49 AM, Leif Hedstrom wrote:

> On 2/26/12 12:10 PM, James Peach wrote:
>> 
>> Wel I dug, and found that TS *really* wants real DNS. I have a Bonjour name and localhost and neither of those resolve in Comcast's DNS ;) I'll just hack in a plugin option to use the system resolver ...
>> 
> 
> Not sure I quite understand, but you can override both the resolver hosts, or which resolv.conf to use, via records.config. I.e.
> 
>    proxy.config.dns.nameservers
>    proxy.config.dns.resolv_conf

Yeh it's just that the names I was trying to resolve are never going to resolve in an external DNS server. They can only be resolved by the system resolver. Anyway, I was able to verify that my original issue was bogus ... TSHttpConnect *does* go through the remap engine as expected ...

J

Re: remapping a URL from a plugin

Posted by Leif Hedstrom <zw...@apache.org>.
On 2/26/12 12:10 PM, James Peach wrote:
>
> Wel I dug, and found that TS *really* wants real DNS. I have a Bonjour name and localhost and neither of those resolve in Comcast's DNS ;) I'll just hack in a plugin option to use the system resolver ...
>

Not sure I quite understand, but you can override both the resolver hosts, 
or which resolv.conf to use, via records.config. I.e.

     proxy.config.dns.nameservers
     proxy.config.dns.resolv_conf


-- Leif


Re: remapping a URL from a plugin

Posted by James Peach <ja...@me.com>.
On 24/02/2012, at 3:03 PM, James Peach wrote:

> On Feb 24, 2012, at 10:37 AM, Leif Hedstrom <le...@ogre.com> wrote:
> 
>> On 02/24/2012 09:16 AM, James Peach wrote:
>>> On Feb 23, 2012, at 11:29 PM, Theo Schlossnagle wrote:
>>> 
>>>> regex_remap is in the repo I believe under plugins.
>>> I think that's the inverse of what I'm looking for.
>>> 
>>> Re-reading my email, it's pretty unclear :) I'm a plugin and I'm going to send a HTTP request. I would like to pass the pending request through the remapping engine before I send it (and also remap the response after I receive it). Is there an API to do that?
>> 
>> Hmmm, doesn't that happen if you use TSHttpConnect ?
> 
> Well last night it was not happenning for me. I'll dig into it some more and double check.

Wel I dug, and found that TS *really* wants real DNS. I have a Bonjour name and localhost and neither of those resolve in Comcast's DNS ;) I'll just hack in a plugin option to use the system resolver ...

J

Re: remapping a URL from a plugin

Posted by James Peach <ja...@me.com>.
On Feb 24, 2012, at 10:37 AM, Leif Hedstrom <le...@ogre.com> wrote:

> On 02/24/2012 09:16 AM, James Peach wrote:
>> On Feb 23, 2012, at 11:29 PM, Theo Schlossnagle wrote:
>> 
>>> regex_remap is in the repo I believe under plugins.
>> I think that's the inverse of what I'm looking for.
>> 
>> Re-reading my email, it's pretty unclear :) I'm a plugin and I'm going to send a HTTP request. I would like to pass the pending request through the remapping engine before I send it (and also remap the response after I receive it). Is there an API to do that?
> 
> Hmmm, doesn't that happen if you use TSHttpConnect ?

Well last night it was not happenning for me. I'll dig into it some more and double check.

> Seems kinda b0rken if it isn't :/ (It goes through the HttpSM / CacheSM though, right ?)
> 
> -- Leif


Re: remapping a URL from a plugin

Posted by Leif Hedstrom <le...@ogre.com>.
On 02/24/2012 09:16 AM, James Peach wrote:
> On Feb 23, 2012, at 11:29 PM, Theo Schlossnagle wrote:
>
>> regex_remap is in the repo I believe under plugins.
> I think that's the inverse of what I'm looking for.
>
> Re-reading my email, it's pretty unclear :) I'm a plugin and I'm going to send a HTTP request. I would like to pass the pending request through the remapping engine before I send it (and also remap the response after I receive it). Is there an API to do that?

Hmmm, doesn't that happen if you use TSHttpConnect ? Seems kinda b0rken 
if it isn't :/ (It goes through the HttpSM / CacheSM though, right ?)

-- Leif

Re: remapping a URL from a plugin

Posted by James Peach <ja...@me.com>.
On Feb 23, 2012, at 11:29 PM, Theo Schlossnagle wrote:

> regex_remap is in the repo I believe under plugins.

I think that's the inverse of what I'm looking for.

Re-reading my email, it's pretty unclear :) I'm a plugin and I'm going to send a HTTP request. I would like to pass the pending request through the remapping engine before I send it (and also remap the response after I receive it). Is there an API to do that? 

> 
> On Fri, Feb 24, 2012 at 1:01 AM, James Peach <jp...@apache.org> wrote:
> 
>> Hey all,
>> 
>> Is there a plugin API that will remap a URL according to the configured
>> remap policy/rules?
>> 
>> J
> 
> 
> 
> 
> -- 
> 
> Theo Schlossnagle
> 
> http://omniti.com/is/theo-schlossnagle


Re: remapping a URL from a plugin

Posted by Theo Schlossnagle <je...@omniti.com>.
regex_remap is in the repo I believe under plugins.

On Fri, Feb 24, 2012 at 1:01 AM, James Peach <jp...@apache.org> wrote:

> Hey all,
>
> Is there a plugin API that will remap a URL according to the configured
> remap policy/rules?
>
> J




-- 

Theo Schlossnagle

http://omniti.com/is/theo-schlossnagle