Forum Discussion
DS_Gowdy_72866
Nimbostratus
Feb 23, 2006HTTP::payload
Hi,
I'm trying to write a rule that can route traffic to a pool based on a binary string that is within the first 10 bytes of the HTTP payload. It would also be useful to log the content of ...
JRahm
Admin
Feb 24, 2006Here's the TCL documentation for the binary scan format:
http://tmml.sourceforge.net/doc/tcl/binary.html
I am no binary scan expert, so you may have to tinker with the formatString (the H10 on the binary scan command line). Give this a try. It loaded with no errors, but it has not been tested:
when HTTP_REQUEST {
if { [HTTP::payload length] > 10 } {
binary scan [HTTP::payload] H10 my_variable
if { $my_variable contains "8100" } {
use pool left
} elseif { $my_variable contains "81FF" } {
use pool right
}
}
}
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