Forum Discussion
Mike_62629
May 19, 2008Nimbostratus
Are http headers case sensitive?
I know the content-matching will be case sensitive, but when doing a header lookup, is the header name itself case sensitive?
Meaning, will this:
[HTTP::header "clientid"]
Return the same data, regardless of whether the http header is clientid, clientId, clientID, Clientid, ClientId, or ClientID?
Thanks for any input.
- hooleylistCirrostratusIt's case insensitive. Here's a quick test:
when HTTP_REQUEST { Insert a test header with a name of TEST and a value of "some_value" HTTP::header insert TEST "some_value" Log the value of the header with variations on the case if {[HTTP::header exists test]}{ log local0. "test: [HTTP::header value test]"} if {[HTTP::header exists TEST]}{ log local0. "TEST: [HTTP::header value TEST]"} if {[HTTP::header exists TeSt]}{ log local0. "TeSt: [HTTP::header value TeSt]"} }
- Mike_62629NimbostratusThanks again, didn't think to test it like that.
- hooleylistCirrostratusYou could also send custom headers (and cookies) from the BIG-IP itself using curl. The BIG-IP can answer requests from the CLI to a VIP on 9.4.0 and above.
- Colin_Walker_12Historic F5 AccountNice example Aaron! Maybe I need to add a page to the Wiki that lists "Cool iRule Tricks!" where we list things like this curl command that are helpful when dealing with iRules, but aren't direct iRules code/commands.
- Colin_Walker_12Historic F5 AccountSince the iRules inherently depend on the profiles applied to VIPs to determine how they'll behave and what commands are valid, there's no way to test them without applying them to a system.
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