Unexpected behaviour with MediaTypeHeaderDelegate's cached values #4230
Closed
hngu-apple
started this conversation in
General
Replies: 3 comments 3 replies
-
As you pointed out the media type values are meant to be case-insensitive. I don't think there is much we can do about that, especially with caching enabled. |
Beta Was this translation helpful? Give feedback.
0 replies
-
After doing some more investigation it looks like this was fixed 62ff36b. It's available as early as 4.6.1.Final. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Thanks for the help James. Going to close this issue as resolved. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We found an interesting issue with Media Type headers in one of our applications. Incoming requests will cache the
Accept
header value and subsequent requests may return a case-differentContent-Type
response header. I believe this is technically correct per the RFC https://www.rfc-editor.org/rfc/rfc9110.html#name-media-type but it does not seem like ideal behaviour that clients can impact the case sensitivity of response headers for other clients.This is the original commit that introduced the cache: ea17ab7
We found this issue after upgrading from 3.6.2.Final -> 4.5.6.Final.
e.g.
Request:
Accept: application/vnd.api+json
Response:
Content-Type: application/vnd.Api+json
Reproducible with this unit test:
Beta Was this translation helpful? Give feedback.
All reactions