Forum Discussion
Walter_Kacynski
Feb 25, 2016Cirrostratus
ASCII LF (0a) in STREAM
Is there a way to represent the hex 0a in the target of a STREAM::expression? Everything I try causes the literal "0a" or "\n" to be inserted instead of the representation of LF.
STREAM::expressi...
Walter_Kacynski
Feb 25, 2016Cirrostratus
In case someone else needs to perform a substitution on something not as simple as "\r" or "\n"... I just came up with this explanation...
With some guidance from https://devcentral.f5.com/wiki/iRules.TCP__payload.ashx and some confusion over when to use decimal or hex, I came up with the following solution
when CLIENT_ACCEPTED {
Store hex 0a (Decimal of 10) as a binary format
set replacement [binary format c* {10}]
STREAM::expression @\r@$replacement@
STREAM::enable
}
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