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
Send part 4, resume+rewind #13026
Closed
Closed
Send part 4, resume+rewind #13026
Conversation
This file contains 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
- total_length() calls down the reader chain, delivers -1 when length is not known - encoding readers, which change length, will intercept this and return -1 - use `Curl_creader_total_length(data)` when evaluating rewind decisions
- the setup of a HTTP request is reshuffled to follow: * determine method, target, auth negotiation * install the client reader(s) for the request, including crlf conversions and "chunked" encoding * apply ranges to client reader * concat request headers, upgrades, cookies, etc. * complete request by determining Content-Length of installed readers in combination with method * send - add methods for client readers to * return the overall length they will generate (or -1 when that is not known) * return the amount of data on the CLIENT level, so that expect-100 can decide if it want to apply itself * set a "resume_from" offset or fail if unsupported - struct HTTP has become largely empty now
- tell creader to rewind on next start - Curl_client_reset() will keep reader for future rewind if requested - add Curl_client_cleanup() for freeing all resources independent of rewinds - add Curl_client_start() to trigger rewinds - move rewind code from multi.c to sendf.c and make part of "cr-in"'s implementation
- when switching from POST to GET disable client rewinds as they will be no longer needed - Client reader "cr_in": make a copy of fread_func and "in" data on creation and use those through the reader's lifetime. This allows a rewind to do the right thing on the old reader when a new request is starting, because data->state.fread_func is reset on entering the CONNECT state (very early).
…signed but never readfix ubuntu scanbuild, assigned but never readfix ubuntu scanbuild, assigned but never readfix ubuntu scanbuild, assigned but never readfix ubuntu scanbuild, assigned but never readfix ubuntu scanbuild, assigned but never readfix ubuntu scanbuild, assigned but never read
This was referenced Mar 4, 2024
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.
On top of #13010:
Client_reader_*
toCurl_creader_*