Forum Discussion
Jonathan_Landis
Nimbostratus
Feb 09, 2006Multiple message-header fields with the same field-name
The following rule logs the "Cookie" header of http requests:
when HTTP_REQUEST {
set ch [HTTP::header "Cookie"]
if {$ch != ""} {log local0. "$ch"} else {log local0. "no cookie"}
}
If there are multiple cookie headers, it returns the last one. Is this a bug or a feature?
- The HTTP::header command will, as you found out, pull the last header with the given name.
- Jonathan_Landis
Nimbostratus
Thanks, Joe! Sometimes there are multiple "Accept" headers as well. Is there a way to collect all of them? - Colin_Walker_12Historic F5 AccountAccording to RFC 2616 there should be one Accept header, with a list of the acceptable data types in it. Click here
- Jonathan_Landis
Nimbostratus
The RFC does not say there should be only one "Accept" header. See the last paragraph in section 4.2.
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