[net] Add SendPutReq to RCurlConnection for S3 uploads#22376
Open
JasMehta08 wants to merge 2 commits into
Open
[net] Add SendPutReq to RCurlConnection for S3 uploads#22376JasMehta08 wants to merge 2 commits into
JasMehta08 wants to merge 2 commits into
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.
This Pull Request:
(Is a part of the GSoC 2026 project
S3 Backend for RNTuple.)The S3 backend needs the ability to upload objects via HTTP PUT. This PR adds a single synchronous PUT method to
RCurlConnection, following the same pattern as the existingSendHeadReq()andSendRangesReq()methods. SigV4 signing is handled automatically by the credentials already configured on the curl handle.This PR:
SendPutReq(const unsigned char *data, std::size_t length)toRCurlConnectionCURLOPT_UPLOADwith a read callback (CURLOPT_READFUNCTION/CURLOPT_READDATA) andCURLOPT_INFILESIZE_LARGEfor Content-LengthTServerSocketpattern from the existing test suite, verifying the PUT method, Content-Length header, and request bodyGTEST_SKIP()whenS3_ACCESS_KEY/S3_SECRET_KEYare not set) that does a PUT, HEAD, and GET round-trip against a real S3 endpointNo connection pooling or retry logic is included in this PR. Those are planned for Phase 4 (Weeks 10-11) as
SendMultiGetReq/SendMultiPutReqand a retry wrapper respectively.Checklist
Local test output
=== SendPutReq Wire-Level Test === Testing against locally built ROOT + RCurl library [Test 1] Basic PUT request PASS: SendPutReq returns success PASS: HTTP method is PUT PASS: Content-Length header matches payload size PASS: body matches payload [Test 2] Empty PUT (zero-length body) PASS: empty SendPutReq returns success PASS: HTTP method is PUT for empty body PASS: body is empty [Test 3] Large PUT (64 KB payload) PASS: large SendPutReq returns success PASS: Content-Length matches 64KB PASS: received body size == 64KB PASS: 64KB body content matches sent payload [Test 4] HEAD after PUT (sticky-option reset) PASS: initial PUT succeeds PASS: first request is PUT PASS: HEAD after PUT succeeds PASS: second request is HEAD (not PUT — sticky options were reset) PASS: HEAD returns correct Content-Length [Test 5] PUT after HEAD (reverse sticky-option check) PASS: first request is HEAD PASS: PUT after HEAD succeeds PASS: second request is PUT (NOBODY was reset) PASS: body arrives correctly after HEAD === Results === Passed: 20 Failed: 0 ALL TESTS PASSEDLocal test output (MinIO integration)