[ 
https://issues.apache.org/jira/browse/TS-3740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-3740:
------------------------------
    Fix Version/s: 6.1.0

> header_rewrite plugin: set-redirect doesn't work with SEND_RESPONSE_HDR_HOOK
> ----------------------------------------------------------------------------
>
>                 Key: TS-3740
>                 URL: https://issues.apache.org/jira/browse/TS-3740
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Plugins
>            Reporter: Gancho Tenev
>             Fix For: 6.1.0
>
>
> DESCRIPTION:
> ATS header_rewrite plugin set-redirect operation doesn't work with 
> SEND_RESPONSE_HDR_HOOK. Please see the debugging notes below for more info.
> HOW TO REPRODUCE:
> Here is a sample plugin configuration files that reproduce the problem
> $ cat /opt/ats/etc/trafficserver/remap.config
> map http://p1 http://h1:8001 \
>     @plugin=header_rewrite.so 
> @pparam=/opt/ats/etc/trafficserver/header_rewrite.config
> $ cat /opt/ats/etc/trafficserver/header_rewrite.config
> cond %{SEND_RESPONSE_HDR_HOOK}
> cond %{STATUS} =502
> set-redirect 302 http://p0/%{PATH} [QSA]
> DEBUGGING NOTES:
> Both conditions in the header_rewrite.config are evaluated correctly but 
> set-redirect has no effect and the response to the UA is not modified as 
> expected.  After some debugging it turned out that if the set-redirect 
> (OperatorSetDestination::exec) is not called from the remap plugin it has no 
> effect. The header_rewrite plugin creates a continuation to be called from 
> SEND_RESPONSE_HDR_HOOK (TSHttpHookAdd()). OperatorSetDestination::exec 
> doesn't have code to handle the case when the set-redirect operation is _not_ 
> called directly from the remap plugin (TSRemapDoRemap()).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to