Forum Discussion
funkdaddy_31014
Nimbostratus
Jan 06, 2011Can'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
- Ricardo_Marinho
Nimbostratus
Hi,
Why not use:
HTTP::header replace "Pragma" ""
This way you remove header!
Regards, - Chris_Miller
Altostratus
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. - funkdaddy_31014
Nimbostratus
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... - hoolio
Cirrostratus
Hi Funkdaddy,
Do you have any modules/features enabled on the virtual server like WAM or RAM cache? If so, they might be affecting Pragma header. Regardless, it would be a good idea to open a case on the issue with F5 Support so they can review your full configuration and logs.
Aaron
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