Skip to content

Fix missing Accept/Allow headers in 415/405 responses with sub-routers#2864

Merged
tsegismont merged 1 commit intovert-x3:5.0from
tsegismont:backport-2863
Mar 20, 2026
Merged

Fix missing Accept/Allow headers in 415/405 responses with sub-routers#2864
tsegismont merged 1 commit intovert-x3:5.0from
tsegismont:backport-2863

Conversation

@tsegismont
Copy link
Copy Markdown
Member

Backport #2863

vert-x3#2863)

When using sub-routers, the Accept header was empty in 415 (Unsupported Media Type) responses and the Allow header was empty in 405 (Method Not Allowed) responses.

This occurred because RoutingContextWrapper accumulated allowed content types and methods but didn't propagate them to the inner context when delegating.

Added addAllowedMethods() and addAllowedContentTypes() methods to RoutingContextInternal to properly synchronize this state between wrapper and inner contexts.

Some portions of this content were created with the assistance of Claude Code.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@tsegismont tsegismont added this to the 5.0.9 milestone Mar 20, 2026
@tsegismont tsegismont merged commit 965fec8 into vert-x3:5.0 Mar 20, 2026
7 checks passed
@tsegismont tsegismont deleted the backport-2863 branch March 20, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant