Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Handle large payloads on 32bit platforms gracefully #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
czechboy0 merged 1 commit into swift-server:main from czechboy0:hd-int-on-32bit
Nov 28, 2023

Conversation

Copy link
Collaborator

@czechboy0 czechboy0 commented Nov 28, 2023

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.

Copy link
Collaborator

@dnadoba dnadoba left a comment

Choose a reason for hiding this comment

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

Thanks!

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

@dnadoba dnadoba dnadoba approved these changes

Assignees
No one assigned
Labels
🔨 semver/patch No public API change.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /