You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Esmq <es...@163.com> on 2013/08/06 10:01:42 UTC
questions about lua plugin
hi,all
i have two questions about lua plugin.
1) can lua plugin produce 301 (permanent) redirect ?
i found that request:redirect(url) will only produce a 302 redirect...
2) when use lua plugin to product a 302 redirect,
i found that it will generated a "ERR_CONNECT_FAIL/302" log entry to the log file~ but actually , i think it is not a ERROR...
thanks
Re:Re: questions about lua plugin
Posted by Esmq <es...@163.com>.
hi jpeach,
thanks for the reply.
you solution to 301 redirect seems doesn't work.
reject(301) do return http 301 response code, but not attach proper Location header.
At 2013-08-07 00:22:07,"James Peach" <jp...@apache.org> wrote:
>On Aug 6, 2013, at 1:01 AM, Esmq <es...@163.com> wrote:
>
>> hi,all
>>
>> i have two questions about lua plugin.
>>
>> 1) can lua plugin produce 301 (permanent) redirect ?
>> i found that request:redirect(url) will only produce a 302 redirect...
>
>This might work:
> request:rewrite(url)
> request:reject(302)
>
>>
>> 2) when use lua plugin to product a 302 redirect,
>> i found that it will generated a "ERR_CONNECT_FAIL/302" log entry to the log file~ but actually , i think it is not a ERROR...
>
>CAn you please file a bug on that?
>
>>
>>
>> thanks
>
Re: questions about lua plugin
Posted by James Peach <jp...@apache.org>.
On Aug 6, 2013, at 1:01 AM, Esmq <es...@163.com> wrote:
> hi,all
>
> i have two questions about lua plugin.
>
> 1) can lua plugin produce 301 (permanent) redirect ?
> i found that request:redirect(url) will only produce a 302 redirect...
This might work:
request:rewrite(url)
request:reject(302)
>
> 2) when use lua plugin to product a 302 redirect,
> i found that it will generated a "ERR_CONNECT_FAIL/302" log entry to the log file~ but actually , i think it is not a ERROR...
CAn you please file a bug on that?
>
>
> thanks