Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

nginx WebDAV in combination with special charachters and whitespace in file/folder names

$
0
0
Hello,

I have nginx up and running as WebDAV server on my Linux NAS. This is the server part of my nginx configuration:

server {
listen 443 ssl;
server_name <virtualhostname>;
auth_basic "Restricted";
auth_basic_user_file .htpasswd;
charset utf-8;
root /mnt/HD_a2/WebDAV;
autoindex on;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
dav_access user:rw group:rw all:r;
client_body_temp_path /mnt/HD_a2/WebDAV/.temp;
client_max_body_size 15G;
create_full_put_path on;
location / { }
}

On my WinXP computer I installed CyberDuck and Netdrive to access the WebDAV site. Both are configured to use UTF-8. Together with Firefox, which at least allows me to see content and download something, that makes 3 clients.

And tell you something, all behave different!

- Firefox first of all shows all files and folders with correct spelling (correct means "the same as if mounted as smb share")
- CyberDuck doesn't show files and folders if whitespaces are contained in the file/folder name (e.g. "My documents")
- The same for Netdrive, but Netdrive even doesn't show files with special characters (e.g. "ä","ö","ü","ß",...)

OK, thats for reading, now for writing I will concentrate on CyberDuck only, because that client has the nice ability to show http communication quite in detail:
- Create file with special characters in the filename (e.g. "PUT https://<virtualhost>/äöü.txt") -> File is created with correct spelling!
- Create a folder with special characters in the foldername (e.g. "MKCOL https://<virtualhost>/äöü") -> Also works flawlessly!
- Copy file (e.g. COPY äöu.txt https://<virtualhost>/äöu2.txt) -> New file is created with http-spelling ("%C3%84%C3%96%C3%9C2.txt" in this case). These files will still be shown correctly ("äöü2.txt" in this case) in CyberDuck and Netdrive but they will not be accessible in any way (http-error "not found").
- MOVE with special character files shows the same kind of misbehaviour
- MOVE with special character folders results in "conflicts" error (409)
- COPY with special character folders results in "internal server error" if it contains something and if not simply nothing happens

Conclusions:
- The server is setup correctly with respect to reading (firefox reads everything correctly and can access everything)
- At least two client apps have problems reading files/folders with special characters names. Why? How can I work around?
- The COPY and MOVE methods certainly misbehave on server side! IMO there is simply no other explanation, why COPY, MOVE, PUT and MKCOL should create destination files with exactly the same URI in different ways! Is this a known bug? Is there a solution?

best regards
ako673de

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>