From 1f70e0c70a6063ac7f67a56dcf65e6b9fee6c01c Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 23 Aug 2024 00:15:16 +0800 Subject: [PATCH] =?UTF-8?q?nixos:=20=E4=B8=B4=E6=97=B6=E5=A4=84=E7=90=86?= =?UTF-8?q?=20curl=20=E4=B8=8D=E4=BC=9A=E9=87=8D=E5=AE=9A=E5=90=91=20206?= =?UTF-8?q?=20+=20Location=20Header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reinstall.sh b/reinstall.sh index 0647f8a..1ca30af 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -978,7 +978,9 @@ setos() { : else # 传统安装 - test_url $mirror/nixos-$releasever/store-paths.xz xz + # 该服务器文件缓存 miss 时会响应 206 + Location 头 + # 但 curl 这种情况不会重定向,所以添加 ascii 类型让它不要报错 + test_url $mirror/nixos-$releasever/store-paths.xz xz/ascii eval ${step}_mirror=$mirror fi }