GNOME Bugzilla – Bug 676627
Wrong 'Type' shown in Nautilus on webdav volume
Last modified: 2014-08-29 20:04:18 UTC
On a mounted webdav folder I have plain text files that are shown as being of "type text/plain; charset=us-ascii" in Nautilus. Double clicking such a text file opens the 'no application to open this type of file' dialog. Instead, the file should be recognized as a text file and opened with gedit.
Can you give details about the server used? I cannot reproduce this against an Apache webdav server. If possible, rerun gvfs in debug mode [1] and then give the debug output that is shown when trying to access the file in Nautilus. Also, please give the output of: gvfs-info dav://host/path/to/textfile.txt [1] In Terminal: GVFS_DEBUG=all GVFS_HTTP_DEBUG=all /usr/libexec/gvfsd -r
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
Created attachment 284450 [details] [review] dav: Ignore parameters of the content type header Ignore parameters of the file's content type since these break applications which make use of the content type. E.g. If the server returns a type such as "text/plain; charset=utf-8", the file won't open in a text editor.
I reproduced this with a lighttpd webdav server with a custom config. The attached patch fixes the problem.
Review of attachment 284450 [details] [review]: Looks good, thanks, but please add a comment why we doing it...
Pushed to master as 554f208e7dc065889358d05d8199a2271756b05e (with a comment). Thanks for the review!