Forum Discussion
[iRule] to trim hex value and send it to pool
Thanks Kevin,
I noticed you use binary, that's probably because yours is HTTP. In my case, my server expects hex, so here's mine:
Code
when CLIENTSSL_HANDSHAKE {
SSL::collect
}
when CLIENTSSL_DATA {
collect hex values
binary scan [SSL::payload] H200 hex
log local0. $hex
set original [SSL::payload]
look at the 8th and 9th hex value
log local0. [string range $hex 8 9]
if {[string index $hex 8] equals "2" and [string index $hex 9] equals "9" }{
log local0. "Test UAT"
SSL::payload replace 0 7 ""
SSL::payload replace 0 0 $original
pool Value29_To_UAT_Svr1
}Is it possible for me to set SSL::payload to it's original after pool redirection? I use
Code
set original [SSL::payload]However
Code
SSL::payload replace 0 0 $original didn't work.
Here's what I think:
For example, original SSL payload total length is 40 bytes. I replace first 7 bytes with empty space, that means now it has 33 bytes. Even with SSL::payload replace 0 0 $original, it still has 33 bytes.
Is there anyway at some point I use back the original SSL payload? It's a pain, because some of the server requires the first 7, some older one does not.
`Andy
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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