Forum Discussion
Wil_Schultz_101
Nimbostratus
Feb 12, 2007How can I grab an HTTP header on CACHE_REQUEST?
I'm trying to grab [HTTP::header "Content-Length"] to use during CACHE_REQUEST so I can make sure the BigIP does not cache blank pages. I've tried to set a global variable during HTTP::Response and no go. The closest I can seem to find would be to use [CACHE::headers] during CACHE_REQUEST.
What I'm using now, fugly...
when CACHE_REQUEST {
set cheaders [CACHE::headers]
if { $cheaders contains "Content-Length\: 0" } {
log local0.$cheaders
CACHE::expire
}
}
What I would like to get closer to... Looks okay, but doesn't seem to work.
when CACHE_REQUEST {
set cheaders [HTTP::header "Content-Length"]
if { $cheaders == 0 } {
log local1.$cheaders
CACHE::expire
}
}
Version 9.2.4
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