Disable http2 in cargo

Since 1.31.0 cargo requires curl to support http2. Enabling http2 in
curl results in a dependency loop. This commit disables the use of
multiplexing and http2.
This commit is contained in:
Johan Anderholm
2019-01-29 20:50:03 +01:00
parent b3d1b589ee
commit fa0aebc070
4 changed files with 40 additions and 11 deletions
+7 -10
View File
@@ -51,18 +51,15 @@ cargo_common_do_configure () {
EOF
fi
if [ -n "${http_proxy}" ]; then
cat <<- EOF >> ${CARGO_HOME}/config
# Disable multiplexing in order to keep cargo from using http2, which we
# can't currently enable because of dependency loops
cat <<- EOF >> ${CARGO_HOME}/config
[http]
proxy = "${http_proxy}"
EOF
fi
multiplexing = false
EOF
if [ -n "${https_proxy}" ]; then
cat <<- EOF >> ${CARGO_HOME}/config
[https]
proxy = "${https_proxy}"
EOF
if [ -n "${http_proxy}" ]; then
echo "proxy = \"{http_proxy}\"" >> ${CARGO_HOME}/config
fi
echo "[target.${HOST_SYS}]" >> ${CARGO_HOME}/config