open class ShallowEtagHeaderFilter : OncePerRequestFilter
javax.servlet.Filter that generates an ETag
value based on the content on the response. This ETag is compared to the If-None-Match
header of the request. If these headers are equal, the response content is not sent, but rather a 304 "Not Modified"
status instead.
Since the ETag is based on the response content, the response (e.g. a org.springframework.web.servlet.View) is still rendered. As such, this filter only saves bandwidth, not server performance.
NOTE: As of Spring Framework 5.0, this filter uses request/response decorators built on the Servlet 3.1 API.
Author
Arjen Poutsma
Author
Rossen Stoyanchev
Author
Brian Clozel
Author
Juergen Hoeller
Since
3.0
ShallowEtagHeaderFilter()
javax.servlet.Filter that generates an Since the ETag is based on the response content, the response (e.g. a org.springframework.web.servlet.View) is still rendered. As such, this filter only saves bandwidth, not server performance. NOTE: As of Spring Framework 5.0, this filter uses request/response decorators built on the Servlet 3.1 API. |
open static fun disableContentCaching(request: ServletRequest): Unit
This method can be used to disable the content caching response wrapper of the ShallowEtagHeaderFilter. This can be done before the start of HTTP streaming for example where the response will be written to asynchronously and not in the context of a Servlet container thread. |
|
open fun isWriteWeakETag(): Boolean
Return whether the ETag value written to the response should be weak, as per RFC 7232. |
|
open fun setWriteWeakETag(writeWeakETag: Boolean): Unit
Set whether the ETag value written to the response should be weak, as per RFC 7232. Should be configured using an |