-
Notifications
You must be signed in to change notification settings - Fork 38.1k
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 overwrites ETag #23775
Comments
I cannot find any calls to |
@rstoyanchev sorry, wrong code snippet. Updated original post. |
This was supposed to have been addressed as part of #22797 via 1a97a26 but I now see omissions:
I will prepare an update and maybe you can give it a try? |
After taking a closer look, only the 2nd point from my previous comment is an issue and that matches the scenario here, (i.e. |
Hello, As I explained in #22797 I am still having an issue with the ShallowEtagHeaderFilter overwriting ETag (and Content-Length), so I created a project with unit tests that demonstrate this: https://github.com/mickaeltr/Spring-ShallowEtagHeaderFilter-issue/blob/master/src/test/java/com/example/demo/DemoControllerTest.java Thank you |
These calls were added in error when trying to fix #22797 and #23775. They are not needed in 304 scenarios. Those have no response content and are skipped by ShallowETagHeaderFilter based on the status. This leaves disableContentCaching invoked only in streaming scenarios, which was the original intent and should be the only reason for that method. See gh-24635
Affects: 5.2.0.RELEASE
Inside a
@Controller
I set the ETag and Cache-control header:ShallowETagHeaderFilter overwrites ETag because isEligibleForEtag method returns true:
ShallowEtagHeaderFilter should first check if an ETag is already set and skip it.
The text was updated successfully, but these errors were encountered: