web: support streaming request bodies - #66
Open
yasunariw wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
Web.http_request_lwt_streaming_body'for buffered streaming uploads with a known content length, usingContent-Lengthrather than chunked transfer encoding. Curl pauses when the buffer is empty and resumes as data arrives.The function accepts a
streaming_bodyconstructed with the content type, content length, andread/closecallbacks. Itsbuffer_sizecontrols read-ahead.It parallels
http_request_lwt'but is separate because asynchronous bodies require pause/resume and producer cleanup.*This raises the minimal ocurl version to 0.9.2, which introduces
Curl.set_readfunction2exposing pause/abort return values.How to test
Includes a loopback test that uploads and verifies a generated 512-1024 KiB body.