Forum Discussion
Nat_Thirasuttakorn
Employee
Nov 09, 2004HTTP::payload vs Null/binary insertion
Hi all,
I have try to insert binary data into HTTP payload by "HTTP::payload replace" command but it insert not as I expected.
for example:-
HTTP::payload...
unRuleY_95363
Dec 01, 2004Historic F5 Account
Please try this out and let us know:
HTTP::payload replace offset 0 [binary format ca* 0 "my goofy string"]
FYI, the problem is that the literal string is converted to Utf-8 when Tcl compiles the rule. This changes any embedded NUL's to C0 80 in the string. Therefore, you still need to use the binary format command to convert from the Utf-8 encoded literal string into a binary array (this is what keeps HTTP::payload replace offset 0 "\000my goofy string" from working).
There is also a known issue with the binary format command that will prevent just using a* from working correctly (ie, binary format a* "\000my goofy string") This has been fixed in the upcoming 9.0.3 release.
Thanks Nat!
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