You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Elli <le...@yahoo.com> on 2012/02/25 22:54:01 UTC

Regex remap plugin redirecting?

Hello,

I have been trying to use the regex remap plugin with ATS v3.0.2 to do redirects.  The plugin has a comment in it
"ToDo: Figure out how we make redirects now from a remap plugin ..." so I 
assume the commented out code below it works with a previous version but not in 3.x? Has anyone had any luck with making the redirect work in 3.0.2?  I am new to ATS and found in experiment.h a method 
TSHttpTxnRedirectRequest which sounds like it may do what I want but 
either doesn't or I am not using it properly.  I have set the response 
code to 302 which is recognized but no Location header is set. Any help 
would be greatly appreciated.

Re: Regex remap plugin redirecting?

Posted by Leif Hedstrom <zw...@apache.org>.
On 2/25/12 2:54 PM, Elli wrote:
> Hello,
>
> I have been trying to use the regex remap plugin with ATS v3.0.2 to do redirects.  The plugin has a comment in it
> "ToDo: Figure out how we make redirects now from a remap plugin ..." so I
> assume the commented out code below it works with a previous version but not in 3.x? Has anyone had any luck with making the redirect work in 3.0.2?  I am new to ATS and found in experiment.h a method
> TSHttpTxnRedirectRequest which sounds like it may do what I want but
> either doesn't or I am not using it properly.  I have set the response
> code to 302 which is recognized but no Location header is set. Any help
> would be greatly appreciated.

I'll try to take a look at this next week. The intention is that redirects 
should work, so maybe it's an easy fix.

-- Leif


Re: Regex remap plugin redirecting?

Posted by Elli <le...@yahoo.com>.
Hello,

Thank you again for the quick response.  That seems to have done the trick. I'll test some more but so far looks good. I'll repost if I find any issues.

Thank you!
Elli



----- Original Message -----
From: Leif Hedstrom <zw...@apache.org>
To: dev@trafficserver.apache.org
Cc: Elli <le...@yahoo.com>
Sent: Monday, February 27, 2012 1:11 PM
Subject: Re: Regex remap plugin redirecting?

On 2/27/12 3:36 AM, Elli wrote:
> Thank you for the quick reply.  I'm not sure if I'm looking in the right place but http://svn.apache.org/repos/asf/trafficserver/plugins/trunk/regex_remap doesn't show any commits and the code is unchanged.  Is there a different repo I should be looking in?

Yeah, the plugins are all in git now too:

    http://git-wip-us.apache.org/repos/asf/trafficserver-plugins.git


I fixed a bug right now in the changes I made, but have not had time to test them (omw to the airport). Let me know if it works.

-- leif

Re: Regex remap plugin redirecting?

Posted by Leif Hedstrom <zw...@apache.org>.
On 2/27/12 3:36 AM, Elli wrote:
> Thank you for the quick reply.  I'm not sure if I'm looking in the right place but http://svn.apache.org/repos/asf/trafficserver/plugins/trunk/regex_remap doesn't show any commits and the code is unchanged.  Is there a different repo I should be looking in?

Yeah, the plugins are all in git now too:

     http://git-wip-us.apache.org/repos/asf/trafficserver-plugins.git


I fixed a bug right now in the changes I made, but have not had time to test 
them (omw to the airport). Let me know if it works.

-- leif


Re: Regex remap plugin redirecting?

Posted by Elli <le...@yahoo.com>.
Thank you for the quick reply.  I'm not sure if I'm looking in the right place but http://svn.apache.org/repos/asf/trafficserver/plugins/trunk/regex_remap doesn't show any commits and the code is unchanged.  Is there a different repo I should be looking in?

Thanks for your help,
Elli



----- Original Message -----
From: Leif Hedstrom <zw...@apache.org>
To: dev@trafficserver.apache.org
Cc: Elli <le...@yahoo.com>
Sent: Monday, February 27, 2012 4:03 AM
Subject: Re: Regex remap plugin redirecting?

On 2/25/12 2:54 PM, Elli wrote:
> Hello,
>
> I have been trying to use the regex remap plugin with ATS v3.0.2 to do redirects.  The plugin has a comment in it
> "ToDo: Figure out how we make redirects now from a remap plugin ..." so I
> assume the commented out code below it works with a previous version but not in 3.x? Has anyone had any luck with making the redirect work in 3.0.2?  I am new to ATS and found in experiment.h a method
> TSHttpTxnRedirectRequest which sounds like it may do what I want but
> either doesn't or I am not using it properly.  I have set the response
> code to 302 which is recognized but no Location header is set. Any help
> would be greatly appreciated.

Please try the latest "trunk" version of the regex_remap plugin, and see 
if that works for you.

-- Leif

Re: Regex remap plugin redirecting?

Posted by Leif Hedstrom <zw...@apache.org>.
On 2/25/12 2:54 PM, Elli wrote:
> Hello,
>
> I have been trying to use the regex remap plugin with ATS v3.0.2 to do redirects.  The plugin has a comment in it
> "ToDo: Figure out how we make redirects now from a remap plugin ..." so I
> assume the commented out code below it works with a previous version but not in 3.x? Has anyone had any luck with making the redirect work in 3.0.2?  I am new to ATS and found in experiment.h a method
> TSHttpTxnRedirectRequest which sounds like it may do what I want but
> either doesn't or I am not using it properly.  I have set the response
> code to 302 which is recognized but no Location header is set. Any help
> would be greatly appreciated.

Please try the latest "trunk" version of the regex_remap plugin, and see 
if that works for you.

-- Leif