1

Zimbra allows to download files via webdav. Unfortunately files with spaces in the name only give empty files back.

How do I have to escape the spaces correctly?

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

This works:

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

The server is a Zimbra 8.0.9. I hope it's not a bug of this older version cause updating is no option.

Julian Reschke
  • 40,156
  • 8
  • 95
  • 98
lumen
  • 219
  • 1
  • 2
  • 10
  • try using `+` instead of `%20`, still empty? (but if using + actually fix the issue, then it's indeed a bug) – hanshenrik Apr 18 '19 at 06:40
  • Unfortunately the same with + . But what I found out it that it's not an empty file as result but a HTTP/1.1 404 Not Found. The empty file is simply made by curl... Anyway - still the same problem. – lumen Apr 18 '19 at 10:34
  • What is strange and maybe a hint: when I locally mount the webdav, the files look like this: `user1@host:~$ ls -la mount_point/attachments/by-type/text/today/ total 189 drwxr-xr-x 2 root root 152 Apr 18 12:34 . drwxr-xr-x 6 root root 216 Apr 18 12:34 .. -rw-r--r-- 1 root root 191068 Apr 18 12:18 'file with spaces.ics' -rw-r--r-- 1 root root 191068 Apr 18 12:22 file_without_spaces.ics` – lumen Apr 18 '19 at 10:38

0 Answers0