We tried to upgrade the spring boot version to 3.2.3, however, we have several tests failing because the ContentCachingResponseWrapper getHeader() is throwing a NullPointerExecption. The last working version is 3.2.2.
In the version 3.2.2, the content-length and content-type are read from the raw response, however, in the 3.2.3, both fields are read from the attribution of the wrapper.
The function getHeaderNames() returns a list of header keys, both content-type and content-length are included in the list. However, when we use the getHeader() to get the value, it returns a null.
I noticed that not every response has the same problem with ContentCachingResponseWrapper, but in some cases both values are not read correctly.
Comment From: wilkinsona
ContentCachingResponseWrapper is part of Spring Framework. The problem that you have described sounds like a duplicate of https://github.com/spring-projects/spring-framework/issues/32317.