Skip to content

disable multiplexing for some versions of curl#12207

Merged
Seldaek merged 2 commits intocomposer:mainfrom
Lctrs:fix/proxy/no-multiplexing-bad-curl
Nov 25, 2024
Merged

disable multiplexing for some versions of curl#12207
Seldaek merged 2 commits intocomposer:mainfrom
Lctrs:fix/proxy/no-multiplexing-bad-curl

Conversation

@Lctrs
Copy link
Contributor

@Lctrs Lctrs commented Nov 22, 2024

I'm behind a corporate proxy and was hitting a Curl 2 (...) [CONN-1-0] send: no filter connected error when trying to download some packages.

Some google research led me to rust-lang/cargo#12202 and its fix rust-lang/cargo#12234.

This PR backports this fix to composer.

In certain versions of libcurl when proxy is in use with HTTP/2
multiplexing, connections will continue stacking up. This was fixed in libcurl 8.0.0 in curl/curl@821f6e2

@Lctrs
Copy link
Contributor Author

Lctrs commented Nov 22, 2024

A more readable version of the backported code can be found here : https://github.com/rust-lang/cargo/blob/88edf01fe39d6d15c8e15dbf4ea478661b7b85e3/src/cargo/util/context/mod.rs#L2983-L3009.

@Lctrs Lctrs marked this pull request as draft November 22, 2024 11:36
@Lctrs
Copy link
Contributor Author

Lctrs commented Nov 22, 2024

Okay, the option needs to be set on the CurlMultiHandle (and not the CurlHandle). I'll think about how to do it.

A quick & dirty test on my corporate environment showed that it did fix my issue.

I'm behind a corporate proxy and was hitting a `Curl 2 (...) [CONN-1-0] send: no filter connected` error when trying to download some packages.

Some google research led me to rust-lang/cargo#12202 and its fix rust-lang/cargo#12234.

This PR backports this fix to composer.

> In certain versions of libcurl when proxy is in use with HTTP/2
multiplexing, connections will continue stacking up. This was
fixed in libcurl 8.0.0 in curl/curl@821f6e2
@Lctrs Lctrs force-pushed the fix/proxy/no-multiplexing-bad-curl branch from 827b895 to 5dbea92 Compare November 22, 2024 13:57
@Lctrs Lctrs marked this pull request as ready for review November 22, 2024 14:14
@Seldaek Seldaek added this to the 2.8 milestone Nov 25, 2024
@Seldaek Seldaek added the Bug label Nov 25, 2024
@Seldaek Seldaek merged commit dc2844c into composer:main Nov 25, 2024
@Seldaek
Copy link
Member

Seldaek commented Nov 25, 2024

Thanks!

@Lctrs Lctrs deleted the fix/proxy/no-multiplexing-bad-curl branch November 25, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants