Use http/1.1 for CurseForge (#4155)

This commit is contained in:
Geoff Bourne
2026-07-11 21:23:04 -05:00
committed by GitHub
parent 175004e656
commit de75f2e671
3 changed files with 8 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
*.sh text eol=lf
scripts/** text eol=lf
+2
View File
@@ -24,6 +24,7 @@ set -eu
: "${CF_API_CACHE_DEFAULT_TTL:=}" # as ISO-8601 duration, such as P2D or PT12H
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
: "${CF_MOD_LOADER_VERSION:=}" # Override mod loader version
: "${CF_USE_HTTP2:=false}" # CF downloads are faster with HTTP 1.1
resultsFile=/data/.install-curseforge.env
@@ -46,6 +47,7 @@ args=(
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
--force-reinstall-modloader="$CF_FORCE_REINSTALL_MODLOADER"
--overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING"
--use-http2="$CF_USE_HTTP2"
)
setArg() {
arg="${1?}"
+4 -1
View File
@@ -10,6 +10,7 @@ set -e -o pipefail
: "${REMOVE_OLD_MODS_DEPTH:=1} "
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
: "${CF_USE_HTTP2:=false}" # CF downloads are faster with HTTP 1.1
: "${MODRINTH_LOADER:=}"
# shellcheck source=start-utils
@@ -296,7 +297,9 @@ function handleModrinthProjects() {
}
function handleCurseForgeFiles() {
args=()
args=(
--use-http2="$CF_USE_HTTP2"
)
if usesMods && ! usesPlugins; then
args+=(--default-category mc-mods)
elif usesPlugins && ! usesMods; then