trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Beardsley <>
Subject header_rewrite to modify destination port based on request header
Date Wed, 07 Oct 2015 17:41:35 GMT
I'd like to modify the destination port based on an incoming request header. It seems like
everything I need is available in the header_rewrite plugin except the value expansion in
the "set-destination port" directive. In the docs it says that this expansion only works for
Is there a way to do something like the following via the existing plugin, maybe my syntax
is wrong? 
cond %{READ_REQUEST_HDR_HOOK} [AND]cond %{CLIENT-HEADER:NEW-PORT} /^[1-9][0-9]*$/set-destination
When I test it I get this debug message: "Would set destination PORT to an invalid range,
Which points me at this code[2]. It looks like the _value variable is set to the string "%{CLIENT-HEADER:NEW-PORT}"
so I guess there is no expansion...
Assuming header_rewrite doesn't support this yet, are there any objections to adding this
View raw message