Skip to content

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Apr 25, 2025

The JAX-RS API is very loose and allows adding Object and in some cases we actually add a List to the headers and we need to take this into account.

While I'm usually not for handling things this way, the API is not enforcing things properly so I think we really need to handle this ourself and be more forgiving if a list is added.

@gsmet gsmet requested a review from geoand April 25, 2025 07:37
@gsmet gsmet changed the title Quarkus REST - Be more permissive when adding headers Quarkus REST - Be more forgiving when adding headers Apr 25, 2025

This comment has been minimized.

@geoand
Copy link
Contributor

geoand commented Apr 25, 2025

Thanks for taking care of this!

Can a test be added easily that reproduces the original problem?

The JAX-RS API is very loose and allows adding Object and in some cases
we actually add a List to the headers and we need to take this into
account.

While I'm usually not for handling things this way, the API is not
enforcing things properly so I think we really need to handle this
ourself.

Fixes quarkusio#47507

This comment has been minimized.

Copy link

quarkus-bot bot commented Jun 18, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 9ff5c34.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@geoand geoand merged commit a974533 into quarkusio:main Jun 18, 2025
101 of 102 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.25 - main milestone Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HeaderHelper.getMediaType throws ClassCastException when Content-Type header is stored as a List
2 participants