Skip to content

Fix #916: Include all produces values in Accept header#1354

Merged
ryanjbaxter merged 2 commits intospring-cloud:4.3.xfrom
Segergren:fix/multiple-produces-accept-header
Mar 30, 2026
Merged

Fix #916: Include all produces values in Accept header#1354
ryanjbaxter merged 2 commits intospring-cloud:4.3.xfrom
Segergren:fix/multiple-produces-accept-header

Conversation

@Segergren
Copy link
Copy Markdown
Contributor

SpringMvcContract.parseProduces() only used the first element of produces, silently dropping additional media types from the Accept header.

@GetMapping(value = "/payments/{id}", produces = {"application/jose", "application/json"})

Before: Accept: application/jose
After: Accept: application/jose, application/json

Fixes gh-916

Fixes spring-cloudgh-916

Signed-off-by: Olof Segergren <olle.segergren@gmail.com>
@Segergren Segergren changed the title fix: include all produces values in Accept header Fix #916: Include all produces values in Accept header Mar 23, 2026
@ryanjbaxter ryanjbaxter linked an issue Mar 24, 2026 that may be closed by this pull request
Signed-off-by: Segergren <olle.segergren@gmail.com>
@Segergren Segergren force-pushed the fix/multiple-produces-accept-header branch from 9e30164 to 738dd18 Compare March 28, 2026 09:51
@Segergren Segergren requested a review from ryanjbaxter March 28, 2026 10:12
@ryanjbaxter ryanjbaxter merged commit 72cc88d into spring-cloud:4.3.x Mar 30, 2026
2 checks passed
@Segergren Segergren deleted the fix/multiple-produces-accept-header branch March 30, 2026 14:55
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.

Multiple MediaTypes in produces not working correctly

3 participants