Skip to content

Add server support for initial-request messages#4344

Merged
rcoh merged 5 commits intomainfrom
fix-initial-request
Oct 13, 2025
Merged

Add server support for initial-request messages#4344
rcoh merged 5 commits intomainfrom
fix-initial-request

Conversation

@rcoh
Copy link
Collaborator

@rcoh rcoh commented Oct 10, 2025

Motivation and Context

#4325: Properly handle initial requests for servers
Fixes: #4235

Description

This adds support for initial-request event stream messages on the server and fixes #4325.

This support is complete (in that it handles both empty and non-empty initial requests and is backwards compatible with clients that do not send initial requests when not required.

BUT: it is not complete in that the errors it sends when the initial request are invalid will not easily make it back to clients. (#4343)

The error needs to be sent over the event-stream, but the current design of the traits in aws-smithy-http-server do not allow opening the event stream in this context.

Testing

Built on the test suite created earlier to test all different cases of event stream error handling.

Checklist

  • For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "client," "server," or both in the applies_to key.
  • For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "aws-sdk-rust" in the applies_to key.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rcoh rcoh force-pushed the fix-initial-request branch from f02f118 to 6238efa Compare October 10, 2025 19:33
@rcoh rcoh marked this pull request as ready for review October 10, 2025 19:35
@rcoh rcoh requested review from a team as code owners October 10, 2025 19:35
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh force-pushed the fix-initial-request branch from 7fe2c8e to a1c6f82 Compare October 13, 2025 17:28
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

rcoh added 5 commits October 13, 2025 14:11
This adds support for `initial-request` event stream messages on the server and fixes #4325.

This support is complete (in that it handles both empty and non-empty initial requests and is
backwards compatible with clients that do not send initial requests when not required.

BUT: it is not complete in that the errors it sends when the initial request are invalid will not easily make it back to clients. (#4343)

The error needs to be sent over the event-stream, but the current design of the traits in aws-smithy-http-server do not allow opening the event stream in this context.
@rcoh rcoh force-pushed the fix-initial-request branch from a1c6f82 to eb31a32 Compare October 13, 2025 18:11
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh rcoh merged commit 4a4cbc4 into main Oct 13, 2025
50 checks passed
@rcoh rcoh deleted the fix-initial-request branch October 13, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

smithy-rs servers to not support initial-request event stream messages We only support one payload member if that payload contains a streaming member

3 participants