Skip to content

'spring.web.resources.cache.use-last-modified=false' doesn't work with Spring MVC #26212

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
fbuechler opened this issue Apr 22, 2021 · 2 comments
Assignees
Labels
type: regression A regression from a previous release
Milestone

Comments

@fbuechler
Copy link

We're using Spring Boot 2.4.4 with Spring MVC to build an application that serves static resources. We noticed that although we set spring.web.resources.cache.use-last-modified=false, the server adds a Last-Modified header.
Looking at the source, the property only seems to be used in WebFluxAutoConfiguration and not in WebMvcAutoConfiguration (https://github.com/spring-projects/spring-boot/search?q=setuselastmodified). Is this intentional or an oversight?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 22, 2021
@snicoll
Copy link
Member

snicoll commented Apr 22, 2021

Thanks for the report, that looks like an oversight to me.

@snicoll snicoll added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 22, 2021
@snicoll snicoll added this to the 2.4.x milestone Apr 22, 2021
@wilkinsona
Copy link
Member

This looks like a regression. It was there originally (in 2.4.0) but was lost in, I think, f1fcfa6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

5 participants