9f492b
--- rustc-beta-src/Cargo.lock.orig	2022-06-22 14:03:26.309745526 -0700
9f492b
+++ rustc-beta-src/Cargo.lock	2022-06-22 14:03:26.310745506 -0700
9f492b
@@ -990,7 +990,6 @@
892f9b
 dependencies = [
892f9b
  "cc",
892f9b
  "libc",
892f9b
- "libnghttp2-sys",
892f9b
  "libz-sys",
892f9b
  "openssl-sys",
892f9b
  "pkg-config",
9f492b
@@ -2101,16 +2100,6 @@
892f9b
 checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
892f9b
 
892f9b
 [[package]]
892f9b
-name = "libnghttp2-sys"
892f9b
-version = "0.1.4+1.41.0"
892f9b
-source = "registry+https://github.com/rust-lang/crates.io-index"
892f9b
-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
892f9b
-dependencies = [
892f9b
- "cc",
892f9b
- "libc",
892f9b
-]
892f9b
-
892f9b
-[[package]]
892f9b
 name = "libz-sys"
b0e138
 version = "1.1.3"
892f9b
 source = "registry+https://github.com/rust-lang/crates.io-index"
9f492b
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig	2022-06-22 14:03:26.310745506 -0700
9f492b
+++ rustc-beta-src/src/tools/cargo/Cargo.toml	2022-06-22 14:04:22.058596881 -0700
86638a
@@ -22,7 +22,7 @@
9f492b
 cargo-util = { path = "crates/cargo-util", version = "0.1.3" }
9f492b
 crates-io = { path = "crates/crates-io", version = "0.34.0" }
892f9b
 crossbeam-utils = "0.8"
86638a
-curl = { version = "0.4.41", features = ["http2"] }
86638a
+curl = { version = "0.4.41", features = [] }
86638a
 curl-sys = "0.4.50"
b0e138
 env_logger = "0.9.0"
892f9b
 pretty_env_logger = { version = "0.4", optional = true }
9f492b
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig	2022-06-13 07:34:54.000000000 -0700
9f492b
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs	2022-06-22 14:03:26.311745485 -0700
9f492b
@@ -183,16 +183,8 @@
9f492b
         }
9f492b
         self.fetch_started = true;
9f492b
 
9f492b
-        // We've enabled the `http2` feature of `curl` in Cargo, so treat
9f492b
-        // failures here as fatal as it would indicate a build-time problem.
9f492b
-        self.multiplexing = self.config.http_config()?.multiplexing.unwrap_or(true);
9f492b
-
9f492b
-        self.multi
9f492b
-            .pipelining(false, self.multiplexing)
9f492b
-            .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
9f492b
-
9f492b
-        // let's not flood the server with connections
9f492b
-        self.multi.set_max_host_connections(2)?;
9f492b
+        // Multiplexing is disabled because the system libcurl doesn't support it.
9f492b
+        self.multiplexing = false;
9f492b
 
9f492b
         self.config
9f492b
             .shell()
9f492b
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig	2022-06-13 07:34:54.000000000 -0700
9f492b
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs	2022-06-22 14:03:26.311745485 -0700
9f492b
@@ -403,16 +403,9 @@
9f492b
         sources: SourceMap<'cfg>,
9f492b
         config: &'cfg Config,
9f492b
     ) -> CargoResult<PackageSet<'cfg>> {
9f492b
-        // We've enabled the `http2` feature of `curl` in Cargo, so treat
9f492b
-        // failures here as fatal as it would indicate a build-time problem.
892f9b
-        let mut multi = Multi::new();
892f9b
-        let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
892f9b
-        multi
892f9b
-            .pipelining(false, multiplexing)
892f9b
-            .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
892f9b
-
892f9b
-        // let's not flood crates.io with connections
892f9b
-        multi.set_max_host_connections(2)?;
9f492b
+        // Multiplexing is disabled because the system libcurl doesn't support it.
892f9b
+        let multi = Multi::new();
892f9b
+        let multiplexing = false;
892f9b
 
892f9b
         Ok(PackageSet {
892f9b
             packages: package_ids
9f492b
@@ -658,7 +651,7 @@
892f9b
 macro_rules! try_old_curl {
892f9b
     ($e:expr, $msg:expr) => {
892f9b
         let result = $e;
892f9b
-        if cfg!(target_os = "macos") {
892f9b
+        if cfg!(any(target_os = "linux", target_os = "macos")) {
892f9b
             if let Err(e) = result {
892f9b
                 warn!("ignoring libcurl {} error: {}", $msg, e);
892f9b
             }