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"]
...
hooleylist
May 20, 2008Cirrostratus
It'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]"}
}
Here is the log output:
: test: some_value
: TEST: some_value
: TeSt: some_value
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