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

spring-projects-issues opened this issue Nov 6, 2014 · 1 comment
in: web status: backported type: bug


Copy link

@spring-projects-issues 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( ~[spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]
        at org.springframework.web.filter.ShallowEtagHeaderFilter.updateResponse( ~[spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]
        at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal( ~[spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter( [spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]
        at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter( [spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]

Affects: 4.0.7, 4.1.1

Issue Links:

  • #15736 ShallowEtagHeaderFilter should not set ETags to non-cached resources

Referenced from: commits 1823ce1, bf9295b

Backported to: 4.0.8

Copy link
Collaborator Author

@spring-projects-issues 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...


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: web status: backported type: bug
None yet

No branches or pull requests

2 participants