From efd1d3d291d14f8d23051bdd989248146cf915b9 Mon Sep 17 00:00:00 2001 From: Ing Date: Wed, 27 Aug 2025 11:36:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20curl=20=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=EF=BC=8C=E5=BC=BA=E5=88=B6=E4=BD=BF=E7=94=A8=20HTTP/1.1=20?= =?UTF-8?q?=E4=BB=A5=E6=8F=90=E9=AB=98=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/initrd/opt/rr/menu.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/initrd/opt/rr/menu.sh b/files/initrd/opt/rr/menu.sh index 79a6a19c..6d6dc8ea 100755 --- a/files/initrd/opt/rr/menu.sh +++ b/files/initrd/opt/rr/menu.sh @@ -1240,7 +1240,7 @@ function getSynoExtractor() { echo "$(TEXT "Downloading old pat to extract synology .pat extractor...")" rm -f "${OLDPAT_PATH}" - STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${OLDPAT_URL}" -o "${OLDPAT_PATH}") + STATUS=$(curl -kL --http1.1 --connect-timeout 10 -w "%{http_code}" "${OLDPAT_URL}" -o "${OLDPAT_PATH}") RET=$? if [ ${RET} -ne 0 ] || [ ${STATUS:-0} -ne 200 ]; then rm -f "${OLDPAT_PATH}" @@ -1382,13 +1382,13 @@ function extractDsmFiles() { # Check disk space left SPACELEFT=$(df --block-size=1 "${PART3_PATH}" 2>/dev/null | awk 'NR==2 {print $4}') # Discover remote file size - FILESIZE=$(curl -skLI --connect-timeout 10 "${PATURL}" | grep -i Content-Length | tail -n 1 | tr -d '\r\n' | awk '{print $2}') + FILESIZE=$(curl -skLI --http1.1 --connect-timeout 10 "${PATURL}" | grep -i Content-Length | tail -n 1 | tr -d '\r\n' | awk '{print $2}') if [ ${FILESIZE:-0} -ge ${SPACELEFT:-0} ]; then # No disk space to download, change it to RAMDISK PAT_PATH="${TMP_PATH}/${PAT_FILE}" fi touch "${PAT_PATH}.downloading" - STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${PATURL}" -o "${PAT_PATH}") + STATUS=$(curl -kL --http1.1 --connect-timeout 10 -w "%{http_code}" "${PATURL}" -o "${PAT_PATH}") RET=$? rm -f "${PAT_PATH}.downloading" if [ ${RET} -ne 0 ] || [ ${STATUS:-0} -ne 200 ]; then