You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Gancho Tenev (JIRA)" <ji...@apache.org> on 2016/09/02 13:22:20 UTC

[jira] [Created] (TS-4809) [header_rewrite] check to make sure "hook" conditions are first in the rule set

Gancho Tenev created TS-4809:
--------------------------------

             Summary: [header_rewrite] check to make sure "hook" conditions are first in the rule set 
                 Key: TS-4809
                 URL: https://issues.apache.org/jira/browse/TS-4809
             Project: Traffic Server
          Issue Type: Improvement
          Components: Plugins
            Reporter: Gancho Tenev


The following configuration

{code}
$ cat etc/trafficserver/remap.config
map http://example.com http://127.0.0.1:8888 \
    @plugin=header_rewrite.so @pparam=hdrs.config

$ cat etc/trafficserver/hdrs.config
cond %{TRUE}
cond %{REMAP_PSEUDO_HOOK}
   set-header Some-Header "some value"
{code}

Triggers the following error which does not show what and where the problem is:

{code}
20160901.23h17m13s [header_rewrite] Unknown condition: REMAP_PSEUDO_HOOK
{code}

I would like to add a check which will prevent the above error and print another error clarifying where and what the problem is, for instance:

{code}
20160901.23h17m13s [header_rewrite] cond %{REMAP_PSEUDO_HOOK} should come first in the rule set at hdrs.config:2
{code}



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