Skip to content
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

in spring boot 3.2.3 ContentCachingResponseWrapper is not reading content-type and content-length #39818

Closed
zheng-wang-cariad opened this issue Mar 1, 2024 · 1 comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue

Comments

@zheng-wang-cariad
Copy link

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 1, 2024
@wilkinsona
Copy link
Member

ContentCachingResponseWrapper is part of Spring Framework. The problem that you have described sounds like a duplicate of spring-projects/spring-framework#32317.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2024
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants