Conversation

czechboy0

Motivation

If there's a request payload with a number of bytes that can't fit into 32 bits, we'd crash.

Modifications

Use a graceful initializer and use .unknown (so no content-length will be sent) if the size exceeds the max of a 32bit int.

Result

No crash for large payloads on 32bit platforms.

Test Plan

Tests pass.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@czechboy0czecy0 merged commit 0859ead into swift-server:main Nov 28, 2023
@czechboy0czecy0 deleted the hd-int-on-32bit branch November 28, 2023 10:26
@czechboy0czecy0 added the 🔨 semver/No public API change.label Nov 28, 2023
Sign up for free to join this conversation on . Already have an account? Sign in to comment
🔨 semver/No public API change.
None yet

Successfully merging this pull request may close these issues.