Skip to content

Reset Pragma header when caching #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

felixbarny
Copy link
Contributor

Spring Security by default sets a Pragma: no-cache header (see CacheControlHeadersWriter). Even if explicitly calling WebContentGenerator#applyCacheSeconds that header is still present, preventing the browser from caching the resource. So cacheForSeconds should remove the Pragma header if it has been set.

Spring Security by default sets a `Pragma: no-cache` header. Even if explicitly calling WebContentGenerator#applyCacheSeconds that header is still present, preventing the browser from caching the resource. So cacheForSeconds should remove the Pragma header if it has been set.
@bclozel
Copy link
Member

bclozel commented Jul 21, 2015

This has been resolved with 09e3fc4 in SPR-13252.
Thanks!

By the way did you sign our CLA?

@bclozel bclozel closed this Jul 21, 2015
@felixbarny
Copy link
Contributor Author

I have signed and agree to the terms of the SpringSource Individual Contributor License Agreement.

@bclozel
Copy link
Member

bclozel commented Jul 21, 2015

Thanks @felixbarny
One more question - did you discover this as a regression when testing the latest RCs with an existing application? Or did you use those HTTP caching features for the first time in an app and found this bug?

(just trying to prepare for a smooth upgrade for all Spring developers...)

@felixbarny
Copy link
Contributor Author

I've discovered this after upgrading from spring-security 3 to 4 as with version 4, the Pragma header is set by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants