stevehuffy
Apr 21, 2015Nimbostratus
Problem with output of E-Tag in iRule
Trying to output an E-Tag, the output does not match the input and I can't figure out how to do it. Looks like it should be easy, but have spent too much time on it, so asking here.
My simple iRule to test with:
when HTTP_REQUEST {
log local0. "test header- [HTTP::header values X-Test]"
}
Test1:
curl http:// -H 'X-Test: "test"'
-
: test header- {"test"}
Test2:
curl http:// -H 'X-Test: W/"test"'
-
: test header- W/\"test\"
I want output to look like this, respectively:
: test header- "test"
: test header- W/"test"
There must be an easy way to do it, I am just not good enough with iRules. TCL lets me do it:
$ tclsh
% puts {"test"}
"test"
% puts W/\"test\"
W/"test"
Please help.