Zimbra允许通过webdav下载文件。不幸的是,名称中带有空格的文件只会返回空文件。
如何正确避开空格?
curl --basic -k --user user1:password https://server.com/dav/user1/attachments/by-type/text/today/file\ with\ spaces.ics --output calendar.ics <--- empty
curl --basic -k --user user1:password "https://server.com/dav/user1/attachments/by-type/text/today/file with spaces.ics" --output calendar.ics <--- empty
curl --basic -k --user user1:password https://server.com/dav/user1/attachments/by-type/text/today/file%20with%20spaces.ics --output calendar.ics <--- empty
这有效:
curl --basic -k --user user1:password https://server.com/dav/user1/attachments/by-type/text/today/file_without_spaces.ics --output calendar.ics <-- correct file
该服务器是Zimbra 8.0.9。我希望这不是此旧版本的错误,因为更新是没有选择的。