mirror of
https://github.com/rclone/rclone.git
synced 2026-09-22 22:06:09 -04:00
lib/rest: fix URLPathEscapeAll breaking WebDAV servers (eg nzbdav) with strict path matching
URLPathEscapeAll was only passing [A-Za-z0-9/] through unencoded, causing it to percent-encode RFC 3986 unreserved characters (-, ., _, ~). Per RFC 3986 §2.3, unreserved characters MUST NOT be percent-encoded, and a URI that unnecessarily encodes them is not equivalent to one that does not. Servers that perform strict path matching without normalising percent-encoded characters will reject the over-encoded form with a 404. Before: /files/my-report.pdf → /files/my%2Dreport%2Epdf After: /files/my-report.pdf → /files/my-report.pdf Reserved characters (spaces, semicolons, colons, etc.) continue to be encoded as before.
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f