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...
Wil_Schultz_101
Nimbostratus
Feb 15, 2007edit: I should note that I changed the min size to 1000 and rebooted last night...
Well, that irule isn't valid in its current form. So I changed to:
when HTTP_REQUEST {
set ::uri [string tolower [HTTP::uri]]
}
when HTTP_RESPONSE {
set ::size [HTTP::header "Content-Length"]
log local0.$::size
if { $::uri contains "/blank.htm" } {
log "Got blank.html of apparent length $::size"
}
}
And receive the following logs:
Feb 15 11:54:27 tmm tmm[1013]: 01220002:6: Rule demo.my.com : local0.0
Feb 15 11:54:27 tmm tmm[1013]: 01220002:6: Rule demo.my.com : Got blank.html of apparent length 0
Feb 15 11:54:27 tmm tmm[1013]: 01220002:6: Rule demo.my.com : local0.
Feb 15 11:54:27 tmm tmm[1013]: 01220002:6: Rule demo.my.com : Got blank.html of apparent length
Feb 15 11:54:28 tmm tmm[1013]: 01220002: repeated 2 times
Feb 15 11:54:29 tmm tmm[1013]: 01220002:6: Rule demo.my.com : local0.0
Feb 15 11:54:29 tmm tmm[1013]: 01220002:6: Rule demo.my.com : Got blank.html of apparent length 0
Feb 15 11:54:29 tmm tmm[1013]: 01220002:6: Rule demo.my.com : local0.
Feb 15 11:54:31 tmm tmm[1013]: 01220002: repeated 15 times
And inside the bigip:
Profile www.my.com_profile
| URI /blank.htm
| Host demo.my.com
| 159 hits Size 202
| Received 2007-02-15 11:54:29 Last sent 2007-02-15 11:57:25
| Expires 1969-12-31 16:00:00 Vary none Vary count 1
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