You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: ShallowEtagHeaderFilter does not add Etag header for ResponseEntity returning methods [SPR-13717] #18290
As we updated our spring dependencies from 4.0.8.RELEASE to 4.2.3.RELEASE the ShallowEtagHeaderFilter stopped working for spring controller methods that return a ResponseEntity. The effect is that no "Etag" header is added to the response.
The problem is, that the HttpEntityMethodProcessor flushes the HttpServletResponse and the ShallowEtagHeaderFilter refuses to add the header if the response is committed.
As a workaround we have implemented the flushBuffer method in the ContentCachingResponseWrapper and delay the original flushBuffer call until copyBodyToResponse is called.
I fixed this issue by not delegating the flushBuffer call to the actual response.
Indeed, multiple parts of Spring can commit the response, making it impossible for the filter to act on it.
In this particular case, Dec 22 has to be seen "on Dec 22 at the latest". We might pull it forward by a week or so. In any case, we'll keep the release target on JIRA up to date.
Activity
spring-projects-issues commentedon Nov 23, 2015
Juergen Hoeller commented
Looking at the version history, I assume this does not happen with 4.1.8, i.e. it's a regression in the 4.2 line?
Brian Clozel, this seems to be a side effect of your changes around #13194...
Juergen
spring-projects-issues commentedon Nov 24, 2015
Brian Clozel commented
I fixed this issue by not delegating the
flushBuffercall to the actual response.Indeed, multiple parts of Spring can commit the response, making it impossible for the filter to act on it.
spring-projects-issues commentedon Nov 25, 2015
Juergen Hoeller commented
Jan Gaedicke, could you please give a recent
4.2.4.BUILD-SNAPSHOTa try and let us know whether it works for you now?Juergen
spring-projects-issues commentedon Nov 26, 2015
Jan Gaedicke commented
Great, thanks for the quick fix. It works for me. Any ideas when the next release will be available?
spring-projects-issues commentedon Nov 26, 2015
Brian Clozel commented
Thanks for the feedback!
For now it's scheduled on December 22nd; you can follow its status here: https://jira.spring.io/browse/SPR/fixforversion/15353/
spring-projects-issues commentedon Nov 26, 2015
Juergen Hoeller commented
In this particular case, Dec 22 has to be seen "on Dec 22 at the latest". We might pull it forward by a week or so. In any case, we'll keep the release target on JIRA up to date.
Juergen