Skip to content

Cache Control only written if not set - #3759

Merged
rwinch merged 2 commits into
spring-projects:masterfrom
rwinch:gh-2953
Mar 15, 2016
Merged

rwinch merged 2 commits into
spring-projects:masterfrom
rwinch:gh-2953

Conversation

@rwinch

@rwinch rwinch commented Mar 15, 2016

Copy link
Copy Markdown
Member

Previously Spring Security always wrote cache control headers and relied on
the application to override the values. This can cause problems with cache
control. For example, applications may only set cache control if the header
is not already set. Additionally, setting of Cache-Control should disable
writing of Pragma.

This commit delays writing headers until just before the response is
committed and only writes the Cache Control headers if they do not exist.

Fixes gh-2953

@rwinch rwinch added the status: duplicate A duplicate of another issue label Mar 15, 2016
@rwinch rwinch added this to the 4.1.0 RC1 milestone Mar 15, 2016
@rwinch rwinch self-assigned this Mar 15, 2016
Previously Spring Security always wrote cache control headers and relied
on the application to override the values. This can cause problems with
cache control. For example, applications may only set cache control if
the header is not already set. Additionally, setting of Cache-Control
should disable writing of Pragma.

This commit delays writing headers until just before the response is
committed and only writes the Cache Control headers if they do not exist.

Fixes spring-projectsgh-2953
rwinch added a commit that referenced this pull request Mar 15, 2016
Cache Control only written if not set
@rwinch
rwinch merged commit 0f2a3b1 into spring-projects:master Mar 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: duplicate A duplicate of another issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant