Forum Discussion
OTS02
Cirrus
Feb 09, 2016Desire to view contents of If-Modified-Since & If-None-Match http headers
Using iRule below:
when HTTP_REQUEST {
set rqst_headers [HTTP::header names]
set hsl [HSL::open -proto UDP -pool HIGH_SPEED_LOGGING]
HSL::send $hsl "REQUEST HEADERS = $rqst_header...
Jordan_Self_149
Feb 09, 2016Historic F5 Account
For logging/modifying specific headers, I find that using a loop is usually the best way to parse through them:
when HTTP_REQUEST {
set rqst_headers [HTTP::header names]
set hsl [HSL::open -proto UDP -pool HIGH_SPEED_LOGGING]
HSL::send $hsl "REQUEST HEADERS = $rqst_headers"
foreach request_header [HTTP::header names] {
if { $request_header eq "If-None-Match" } {
HSL::send $hsl " $request_header = [HTTP::header values $request_header] "
}
}
}
The result should be that the If-None-Match header is logged along with the value using this format:
HEADER NAME = HEADER VALUE
Hope this helps!
OTS02
Cirrus
Feb 10, 2016Thanks Jordan - works very well!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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