Forum Discussion
Christopher_J_B
Nimbostratus
Sep 22, 2010Attempting to remove newline/spaces from a HTTP:payload without sucess
I have an irule that parses http payload that contain xml using the findstr function; the problem is some vendors xml requests have spaces and/or newline characters which getting difficult to account ...
Joel_Moses
Nimbostratus
Sep 22, 2010Hi Chris!
Using brackets should work fine, but sometimes the BigIP's validation routines are a little... uh... anal.
set tmp [findstr [string map [" " "" "\n" ""][HTTP::payload]] "<" 16 ":"]
might be best converted to:
set tmp [findstr [string map {" " "" "\n" ""} [HTTP::payload]] "<" 16 ":"]
The bottom one applies correctly on 9.x and 10.x, the top one complains about the undefined procedure (the parser -- incorrectly -- thinks that the bracketed syntax should contain some sort of command). In testing this, it appears to work fine, although smacking around a payload in this way is a bit scary to me...
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