Forum Discussion
Narendra_26827
Jul 07, 2011Nimbostratus
iRule to read key/value pair from Data Group lists
We
have a requirement with our product that load balancer should be able to send
requests to a particular pool ip based on a configuration file that we should
have in the load balancer. Example: ...
hooleylist
Jul 07, 2011Cirrostratus
I always like to check that the value of a header or cookie is not null instead of checking to see if it exists before trying to use the value. It's an odd corner case to check for, but I've seen a few rules break by assuming the header or cookie will have a value if it's present.
if {[HTTP::header "myCustomHeader"] ne ""} {
...
If the header isn't set, the header command will return a null string. You don't have to worry about an error if the header doesn't exist.
Aaron
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