Skip to content

bugfix: read full message checksum on partial event stream reads - #3373

Merged
stobrien89 merged 2 commits into
aws:masterfrom
lazerg:bugfix-eventstream-partial-checksum-read
Oct 25, 2026
Merged

stobrien89 merged 2 commits into
aws:masterfrom
lazerg:bugfix-eventstream-partial-checksum-read

Conversation

@lazerg

@lazerg lazerg commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available:
closes #3371

Description of changes:
NonSeekableStreamDecodingEventStreamIterator already loops over partial reads for the headers and payload since #3165, but it still read the 4-byte message checksum with a single read(4). When the stream hands those bytes back across more than one read, the comparison runs against a truncated checksum and a valid event fails with "Message checksum mismatch." This reads the checksum in a loop until all 4 bytes arrive or the stream ends. The new test runs the existing event-stream cases with reads capped at 1 byte.

Generated by AI tools, and reviewed by @lazerg.

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

@lazerg
lazerg requested a review from a team as a code owner October 10, 2026 14:41
@stobrien89

Copy link
Copy Markdown
Member

Looks good to me. We'll wait to merge until the current change set has been released. This applies to the other PRs you opened as well.

@stobrien89
stobrien89 merged commit 2808b6c into aws:master Oct 25, 2026
23 of 26 checks passed
@stobrien89

Copy link
Copy Markdown
Member

Thanks for the contribution @lazerg!

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.

Event stream decoder reports a checksum mismatch when the checksum is read in parts

2 participants