location ^~/download {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
charset utf-8,gbk;
alias /data
}
nginx自带的文件列表功能FDM提示不能断点续传,IDM又提示可以断点续传,浏览器上面下载短时间断开下载可以断点续传,如果长时间断开下载再继续就会提示网络错误,curl携带range头请求了一下文件,第一次返回200,第一次返回206,第三次又返回200,使用alist文件列表程序本地存储做对照,三次均返回206。如果nginx文件列表支持断点续传三次请求均应该返回206,但它只返回了一次,就很离谱,想换成alist但它不抗高并发,连接数一大下载就死了,还得使用原生nginx列表,是我的配置有问题吗?万能的MJJ也没有上面解决办法。
curl http://mysite.com/rar -i -H "Range: bytes=2024-64569"
HTTP/1.1 200 OK
Date: Thu, 23 May 2024 10:47:00 GMT
Content-Type: application/x-rar-compressed
Content-Length: 1836766698
Connection: keep-alive
Last-Modified: Wed, 19 Oct 2022 07:50:26 GMT
ETag: "6d7ad5ea-5eb5e76321480"
Cache-Control: max-age=691200
HTTP/1.1 206 Partial Content
Date: Thu, 23 May 2024 10:47:30 GMT
Content-Type: application/x-rar-compressed
Content-Length: 62546
Connection: keep-alive
Last-Modified: Wed, 19 Oct 2022 07:50:26 GMT
ETag: "6d7ad5ea-5eb5e76321480"
Content-Range: bytes 2024-64569/1836766698
Cache-Control: max-age=691200
HTTP/1.1 200 OK
Date: Thu, 23 May 2024 10:47:46 GMT
Content-Type: application/x-rar-compressed
Content-Length: 1836766698
Connection: keep-alive
Last-Modified: Wed, 19 Oct 2022 07:50:26 GMT
ETag: "6d7ad5ea-5eb5e76321480"
Cache-Control: max-age=691200