-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add support for request body to be larger than 2GB on 32-bit devices #746
Conversation
@swift-server-bot test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This already looks very god! Great patch! @Lukasa can you please check the API changes?
…d Atomics with NIOLock in RequestBagTests. Fixed test cases.
@swift-server-bot add to allowlist |
…e path in a URL instance created from a relative URL.
… from the path in a URL instance created from a relative URL." This reverts commit 330117f.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great change!
Motivation:
Int
.Int32.max
, these properties overflow and cause a crash.Int64
type.Modifications:
known
field of theRequestBodyLength
enum toInt64
.expectedBodyLength
andsentBodyBytes
inHTTPRequestStateMachine
toInt64?
andInt64
respectively.public var length: Int?
property ofHTTPClient.Body
and backed it with a new property:contentLength: Int64?
stream
function inHTTPClient.Body
to work with the newcontentLength
property.stream
function has different parameter names (length
->contentLength
andstream
->bodyStream
) to avoid ambiguity problems.Int32
.Result: