Do not cache Content-Type in ContentCachingResponseWrapper
Based on feedback from several members of the community, we have
decided to revert the caching of the Content-Type header that was
introduced in ContentCachingResponseWrapper in 375e0e6827.
This commit therefore completely removes Content-Type caching in
ContentCachingResponseWrapper and updates the existing tests
accordingly.
To provide guards against future regressions in this area, this commit
also introduces explicit tests for the 6 ways to set the content length
in ContentCachingResponseWrapper and modifies a test in
ShallowEtagHeaderFilterTests to ensure that a Content-Type header set
directly on ContentCachingResponseWrapper is propagated to the
underlying response even if content caching is disabled for the
ShallowEtagHeaderFilter.
See gh-32039
See gh-32317
Closes gh-32321
@ -60,9 +60,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@@ -60,9 +60,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@ -150,28 +147,11 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@@ -150,28 +147,11 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@ -182,9 +162,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@@ -182,9 +162,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@ -195,9 +172,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@@ -195,9 +172,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@ -229,9 +203,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@@ -229,9 +203,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@ -242,9 +213,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@@ -242,9 +213,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@ -253,14 +221,9 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@@ -253,14 +221,9 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@ -333,10 +296,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
@@ -333,10 +296,6 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {