You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/02/17 15:40:18 UTC

[jira] [Commented] (TS-3740) header_rewrite plugin: set-redirect doesn't work with SEND_RESPONSE_HDR_HOOK

    [ https://issues.apache.org/jira/browse/TS-3740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15150579#comment-15150579 ] 

ASF GitHub Bot commented on TS-3740:
------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/trafficserver/pull/253


> 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
>            Assignee: 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)