Skip to content
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

ShallowEtagHeaderFilter is not Servlet 2.5 compatible [SPR-12414] #17022

Closed
spring-projects-issues opened this issue Nov 6, 2014 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Nov 6, 2014

Johannes Graham opened SPR-12414 and commented

org.springframework.web.filter.ShallowEtagHeaderFilter calls javax.servlet.http.HttpServletResponse.getHeader, which was added in Servlet 3.0

Stack Trace:

java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getHeader(Ljava/lang/String;)Ljava/lang/String;
        at org.springframework.web.filter.ShallowEtagHeaderFilter.isEligibleForEtag(ShallowEtagHeaderFilter.java:153) ~[spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]
        at org.springframework.web.filter.ShallowEtagHeaderFilter.updateResponse(ShallowEtagHeaderFilter.java:102) ~[spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]
        at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:84) ~[spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]
        at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112) [spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]

Affects: 4.0.7, 4.1.1

Issue Links:

Referenced from: commits 1823ce1, bf9295b

Backported to: 4.0.8

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Nov 6, 2014

Juergen Hoeller commented

Good catch! As of 4.1.2 and 4.0.8, ShallowEtagHeaderFilter skips its "Cache-Control" header check - the one introduced in #15736 - on Servlet 2.5 containers.

This will be available in the upcoming 4.1.2/4.0.8.BUILD-SNAPSHOT within an hour. Please give it a try if you have the chance...

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug status: backported An issue that has been backported to maintenance branches in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.1.2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants