Skip to content

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

Merged
tsegismont merged 1 commit intovert-x3:masterfrom
tsegismont:issue/2861
Mar 20, 2026
Merged

Fix missing Accept/Allow headers in 415/405 responses with sub-routers#2863
tsegismont merged 1 commit intovert-x3:masterfrom
tsegismont:issue/2861

Conversation

@tsegismont
Copy link
Copy Markdown
Member

@tsegismont tsegismont commented Mar 20, 2026

See #2861

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.

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.1.0 milestone Mar 20, 2026
@tsegismont tsegismont added the bug label Mar 20, 2026
@tsegismont tsegismont merged commit c776670 into vert-x3:master Mar 20, 2026
7 checks passed
@tsegismont tsegismont deleted the issue/2861 branch March 20, 2026 16:02
tsegismont added a commit to tsegismont/vertx-web that referenced this pull request Mar 20, 2026
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 added a commit that referenced this pull request Mar 20, 2026
#2863) (#2864)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant