Skip to content

Conversation

@bbockelm
Copy link
Collaborator

@bbockelm bbockelm commented Apr 9, 2025

On older versions of libcurl (at least 7.x), PUTs unconditionally triggered the use of Expect: 100-continue.

We've observed that newer versions of libcurl no longer force this behavior -- but also have bugs when it's not present! Upstream issue is reported at curl/curl#17004.

Pragmatically, until libcurl is fixed -- and we can assume the fix is deployed everywhere -- we will need to go back to the older behavior as seen on AlmaLinux 9 and similar.

Credit to @dynamic-entropy for uncovering the issue, narrowing it down, and coming up with the approach for the fix. I just added some comments :)

Fixes: #2470

@amadio amadio requested a review from ccaffy April 10, 2025 08:40
@amadio amadio added this to the 5.8.1 milestone Apr 10, 2025
@ccaffy
Copy link
Contributor

ccaffy commented Apr 10, 2025

Thanks for the fix @bbockelm ,

I did not manage to see how you get the value m_content_length for HTTP TPC PUSH in SetupHeaders.
I tried it on my box and I only get '-1' instead of a value there, even if I manually set the Content-Length header on the COPY PUSH curl request.

The only place where m_content_length is set is in State::SetTransferParameters(...) which is called by runCurlWithStreams() called by PULL transfers.

Maybe I missed something though ;)

Thanks

On older versions of libcurl (at least 7.x), PUTs unconditionally
triggered the use of `Expect: 100-continue`.

We've observed that newer versions of libcurl no longer force this
behavior -- but also have bugs when it's not present!  Upstream
issue is reported at curl/curl#17004.

Pragmatically, until libcurl is fixed -- and we can assume the fix
is deployed everywhere -- we will need to go back to the older
behavior as seen on AlmaLinux 9 and similar.
@amadio amadio moved this to In progress in Release Planning Apr 10, 2025
@amadio amadio merged commit dd1797e into xrootd:master Apr 10, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Release Planning Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TPC COPY Failure for files < 1 MB on curl > 8

3 participants