trafficserver
trafficserver copied to clipboard
HRW: Add support for elif, in if-elif-else
This adds an elif clause to the conditions. E.g.
cond %{SEND_RESPONSE_HDR_HOOK} [AND]
cond %{CLIENT-HEADER:X-Foo} ="foo"
set-header X-Resp "foo"
elif
cond %{CLIENT-HEADER:X-Foo} ="bar"
set-header X-Resp "bar"
elif
cond %{CLIENT-HEADER:X-Foo} ="baz"
set-header X-Resp "baz"
else
set-header X-Resp "else"
In addition, this cleans up the handling of the existing "else" clause, and I ran clang-tidy over the two files I was editing.
Co-author: Miles L.
[approve ci osx]
[approve ci]