Forum Discussion
funkdaddy_31014
Jan 06, 2011Nimbostratus
Can't remove Pragma header
Having some content caching issues with a client and I'd like to remove the Pragma header in the event that it's messing things up. I have tried the following:
when HTTP_RESPONSE {
log local0. "BEFORE HEADER: Pragma: [HTTP::header Pragma]"
HTTP::header remove "Pragma"
log local0. "AFTER HEADER: Pragma: [HTTP::header Pragma]"
}
But this always ends up with "Pragma: no-cache"
Jan 6 14:14:07 tmm tmm[2083]: Rule pragma_test : BEFORE HEADER: Pragma: no-cache
Jan 6 14:14:07 tmm tmm[2083]: Rule pragma_test : AFTER HEADER: Pragma: no-cache
Replacing the Pragma header works:
when HTTP_RESPONSE {
log local0. "BEFORE HEADER: Pragma: [HTTP::header Pragma]"
HTTP::header replace "Pragma" "foo"
log local0. "AFTER HEADER: Pragma: [HTTP::header Pragma]"
}
Ends up with "Pragma: foo" in the Response Headers.
Jan 6 14:28:10 tmm tmm[2083]: Rule pragma_test : BEFORE HEADER: Pragma: no-cache
Jan 6 14:28:10 tmm tmm[2083]: Rule pragma_test : AFTER HEADER: Pragma: foo
Any ideas?
4 Replies
Sort By
- Hi,
- Besides logging, have you done a packet capture to see whether the header is indeed being sent? Just curious whether the logging is correct as I'd expect the header to be removed.
- Thanks for the replies. Indeed I have done a packet capture and the Pragma is not being removed. Replacing with "" works but I was more concerned with understanding why remove doesen't work...
- Hi Funkdaddy,
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