Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用curl通过webdav上传文件到百度网盘时失败,报错Method Not Allowed #5717

Closed
4 tasks done
liukuan97 opened this issue Dec 20, 2023 · 5 comments
Closed
4 tasks done
Labels
bug Something isn't working stale No activity for more than 30 days

Comments

@liukuan97
Copy link

Please make sure of the following things

  • I have read the documentation.
    我已经阅读了文档

  • I'm sure there are no duplicate issues or discussions.
    我确定没有重复的issue或讨论。

  • I'm sure it's due to AList and not something else(such as Network ,Dependencies or Operational).
    我确定是AList的问题,而不是其他原因(例如网络依赖操作)。

  • I'm sure this issue is not fixed in the latest version.
    我确定这个问题在最新版本中没有被修复。

AList Version / AList 版本

v3.29.1

Driver used / 使用的存储驱动

百度网盘

Describe the bug / 问题描述

使用curl通过webdav上传文件到百度网盘时失败,报错Method Not Allowed
上传命令:
curl -u $webdav_user:$webdav_password -T $backup_dir/$backup_filename $webdav_url
当上传文件大小为8M、11.9M、12.8M时均成功上传
但是上传文件大小为15.2M、16M、和其他更大的文件时均上传失败,报错Method Not Allowed
我的Nginx配置为client_max_body_size设置为100m,超时时间都设置为足够大
更换到旧版本v3.26.0时问题无法复现

Reproduction / 复现链接

Config / 配置

{
"force": false,
"site_url": "",
"cdn": "",
"jwt_secret": "***",
"token_expires_in": 48,
"database": {
"type": "sqlite3",
"host": "",
"port": 0,
"user": "",
"password": "",
"name": "",
"db_file": "data/data.db",
"table_prefix": "x_",
"ssl_mode": ""
},
"scheme": {
"address": "0.0.0.0",
"http_port": 5244,
"https_port": -1,
"force_https": false,
"cert_file": "",
"key_file": "",
"unix_file": "",
"unix_file_perm": ""
},
"temp_dir": "data/temp",
"bleve_dir": "data/bleve",
"dist_dir": "",
"log": {
"enable": true,
"name": "data/log/log.log",
"max_size": 50,
"max_backups": 30,
"max_age": 28,
"compress": false
},
"delayed_start": 0,
"max_connections": 0,
"tls_insecure_skip_verify": true,
"tasks": {
"download": {
"workers": 5,
"max_retry": 1
},
"transfer": {
"workers": 5,
"max_retry": 2
},
"upload": {
"workers": 5,
"max_retry": 0
},
"copy": {
"workers": 5,
"max_retry": 2
}
},
"cors": {
"allow_origins": [
"
"
],
"allow_methods": [
"
"
],
"allow_headers": [
"
"
]
}
}

Logs / 日志

github.com/alist-org/alist/v3/internal/op.Put
/app/internal/op/fs.go:578
github.com/alist-org/alist/v3/internal/fs.putDirectly
/app/internal/fs/put.go:69
github.com/alist-org/alist/v3/internal/fs.PutDirectly
/app/internal/fs/fs.go:96
github.com/alist-org/alist/v3/server/webdav.(*Handler).handlePut
/app/server/webdav/webdav.go:341
github.com/alist-org/alist/v3/server/webdav.(*Handler).ServeHTTP
/app/server/webdav/webdav.go:65
github.com/alist-org/alist/v3/server.ServeWebDAV
/app/server/webdav.go:46
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server.WebDAVAuth
/app/server/webdav.go:113
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server/middlewares.StoragesLoaded
/app/server/middlewares/check.go:14
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576
net/http.serverHandler.ServeHTTP
/usr/lib/go/src/net/http/server.go:2938
net/http.(*conn).serve
/usr/lib/go/src/net/http/server.go:2009
runtime.goexit
/usr/lib/go/src/runtime/asm_amd64.s:1650
[GIN] 2023/12/20 - 08:23:29 | 405 | 37.10644946s | 20.239.88.37 | PUT "/dav/BaiduNetdisk/url/ttrss/ttrss.sql"
^[[31mERRO^[[0m[2023-12-20 08:25:32] failed put /BaiduNetdisk/url/ttrss: req: [https://pan.baidu.com/rest/2.0/xpan/file] ,errno: 31500, refer to https://pan.baidu.com/union/doc/
github.com/alist-org/alist/v3/internal/op.Put
/app/internal/op/fs.go:578
github.com/alist-org/alist/v3/internal/fs.putDirectly
/app/internal/fs/put.go:69
github.com/alist-org/alist/v3/internal/fs.PutDirectly
/app/internal/fs/fs.go:96
github.com/alist-org/alist/v3/server/webdav.(*Handler).handlePut
/app/server/webdav/webdav.go:341
github.com/alist-org/alist/v3/server/webdav.(*Handler).ServeHTTP
/app/server/webdav/webdav.go:65
github.com/alist-org/alist/v3/server.ServeWebDAV
/app/server/webdav.go:46
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server.WebDAVAuth
/app/server/webdav.go:113
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server/middlewares.StoragesLoaded
/app/server/middlewares/check.go:14
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240
github.com/gin-gonic/gin.(*Context).Next
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576
net/http.serverHandler.ServeHTTP
/usr/lib/go/src/net/http/server.go:2938
net/http.(*conn).serve
/usr/lib/go/src/net/http/server.go:2009
runtime.goexit
/usr/lib/go/src/runtime/asm_amd64.s:1650
^[[31mERRO^[[0m[2023-12-20 08:25:32] PUT /dav/BaiduNetdisk/url/ttrss/9513b1e68918f5e901344634cc62b9be.mp4 req: [https://pan.baidu.com/rest/2.0/xpan/file] ,errno: 31500, refer to https://pan.baidu.com/union/doc/

@liukuan97 liukuan97 added the bug Something isn't working label Dec 20, 2023
Copy link

welcome bot commented Dec 20, 2023

Thanks for opening your first issue here! Be sure to follow the issue template!

Copy link

stale bot commented Feb 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No activity for more than 30 days label Feb 2, 2024
Copy link

Hello @, this issue was closed due to inactive more than 52 days. You can reopen or recreate it if you think it should continue. Thank you for your contributions again.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
@Iceber
Copy link

Iceber commented Aug 6, 2024

遇到了一模一样的问题,前面没有任何代理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale No activity for more than 30 days
Projects
None yet
Development

No branches or pull requests

2 participants