Forum Discussion
Mark_58017
Nimbostratus
Jan 09, 2013iRule to check header length
Hi,
I have a customer that wishes to send larger queries to a different pool. He's noticed the difference between queries can be decided by header length. He wants an iRule that picks up another pool if the header length is over 50k.
I've tried a couple of different iRules pulled from here and amended to no avail. I haven't specified them as I'm looking for a fresh take on the problem.
Thanks in advance.
6 Replies
- What_Lies_Bene1
Cirrostratus
I assume you mean HTTP header? If so, is there a specific header? - Mark_58017
Nimbostratus
Apologies I wasn't clear it is the payload length that we wish to interrogate. - hoolio
Cirrostratus
If the client sets a content-length header in the request you could check that with [HTTP::header Content-Length]:when HTTP_REQUEST { Check if client is sending more than 500 bytes if { [HTTP::header Content-Length] > 500 }{ Select big_pool pool big_pool } else { pool my_default_pool } }
Aaron - Mark_58017
Nimbostratus
Thanks, I'm not sure if that field is in there but I've stuck it on there to test. - Tim_K_92675
Cirrostratus
For payload length maybe - http::payload length
https://devcentral.f5.com/wiki/irules.http__payload.ashx - Mark_58017
Nimbostratus
All working thanks
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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