From 902fed2bccb23635f9e24616170fa2d015763daf Mon Sep 17 00:00:00 2001 From: feimeng <253564238@qq.com> Date: Wed, 11 Jun 2025 19:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=A2=AB=E9=87=8D=E5=AE=9A?= =?UTF-8?q?=E5=90=91=E7=8A=B6=E6=80=81=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 还需要添加 301 状态码 301 永久重定向 302 临时重定向 --- lib/src/webdav_dio.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/webdav_dio.dart b/lib/src/webdav_dio.dart index 157623c..fc5e39c 100644 --- a/lib/src/webdav_dio.dart +++ b/lib/src/webdav_dio.dart @@ -132,7 +132,7 @@ class WdDio with DioMixin implements Dio { onReceiveProgress: onReceiveProgress, cancelToken: cancelToken, ); - } else if (resp.statusCode == 302) { + } else if (resp.statusCode == 301 || resp.statusCode == 302) { // 文件位置被重定向到新路径 if (resp.headers.map.containsKey('location')) { List? list = resp.headers.map['location'];