Forum Discussion
Moe_Jartin
Cirrus
Aug 03, 2010Remove Multiple Headers
We have an issue where a SSO application is inserting headers which back end applications use to personalize content. There is a bug in the application software that causes problems if headers are inserted with no value. I have been tasked with writing an irule to fix the issue until the bug is resolved. I have been researching the forums for how to remove all request headers that have a null value but, I still haven't even come close to a working irule.
I know I need to build an array or set a variable listing the name of each header that has no value and then use the "HTTP::header remove" command to get rid of them. I just have no idea how to get and store the null value header names. HELP???
- hoolio
Cirrostratus
Hi Joe,when HTTP_REQUEST { Loop through each header by name foreach a_header [HTTP::header names] { Check if the header value is empty if {[HTTP::header $a_header] eq ""}{ Remove the header HTTP::header remove $a_header } } }
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