Further document ShallowEtagHeaderFilter limitations

This commit improves the documentation for the
`ShallowEtagHeaderFilter`, stating that it is only meant to support a
subset of conditional HTTP requests: GET requests with "If-None-Match"
headers. Other headers and state changing HTTP methods are not supported
here, as the filter only operates on the content of the response and has
no knowledge of the resource being served.

Closes gh-30517
This commit is contained in:
Brian Clozel
2023-07-06 09:37:00 +02:00
parent b7b9f2cb6b
commit 430a24e6bc
2 changed files with 8 additions and 3 deletions

View File

@@ -46,6 +46,10 @@ import org.springframework.web.util.WebUtils;
* (e.g. a {@link org.springframework.web.servlet.View}) is still rendered.
* As such, this filter only saves bandwidth, not server performance.
*
* <p>State-changing HTTP methods and other HTTP conditional request headers such as
* {@code If-Match} and {@code If-Unmodified-Since} are outside the scope of this filter.
* Please consider using {@link ServletWebRequest#checkNotModified(String, long)} instead.
*
* @author Arjen Poutsma
* @author Rossen Stoyanchev
* @author Brian Clozel