Forum Discussion
Chadwick_McInni
Nimbostratus
Nov 02, 2007How to escape $
Hi, in the rule below, we need to insert a header with a name that starts with $. Escaping $ with \ (\$) isn't working. Is there another way to escape $ ?
when HTTP_REQUEST {
HTTP::header insert "\$xyz" "ValueOfXYZheader"
log local0.info "header is [HTTP::header value \$xyz]"
}
The ltm log shows:
Rule insert_header_rule : header is
The header value isn't displayed.
We've tried "\$xyz", {\$}, \$, ...
Thanks,
Chad
2 Replies
- hoolio
Cirrostratus
I think you should be able to use curly braces to force the header name to be interpreted as a string:
HTTP::header insert {$xyz} "ValueOfXYZheader"
Aaron - Chadwick_McInni
Nimbostratus
This worked, changed the $ to its html value, and escaped the & and with \. Thanks!
HTTP::header insert "\&\36xyz" "ValueOfXYZheader"
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects