Bug 365356 - KIO supports WebDAV, but doesn't accept the dav:// URL scheme (Nautilus syntax)
Summary: KIO supports WebDAV, but doesn't accept the dav:// URL scheme (Nautilus syntax)
Status: ASSIGNED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: WebDAV (show other bugs)
Version: 5.24.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Ben Gruber
URL: https://github.com/cryptomator/crypto...
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2016-07-11 13:28 UTC by KDE Neon user
Modified: 2023-11-21 21:25 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description KDE Neon user 2016-07-11 13:28:37 UTC
Nautilus loads WebDAV servers with URLs such as:

    dav://localhost:42427/

While Dolphin prefer this instead:

    webdav://localhost:42427/Backup/

Developers of programs such as Cryptomator shouldn't have to test what file manager you have installed to generate an appropriate link (see https://github.com/cryptomator/cryptomator/issues/307). Dolphin could support dav:// by itself, or convert it automatically to webdev:// in the address bar.

Reproducible: Always

Steps to Reproduce:
You can reproduce this with any application that attempts to load a WebDAV URL such as dav://localhost:42427/ , using dav:// as its protocol scheme. The program I'm using is Cryptomator:

1. Install Cryptomator (http://cryptomator.org/)
2. Create a vault
3. Use the option to reveal a drive

Actual Results:  
I get an error because the program was coded to load dav://localhost:42427/ (Nautilus scheme) first, and use Dolphin (webdav://) just as a fallback option. 

Expected Results:  
The first URL with dav:// should have been loaded by Dolphin, since it's the same protocol/technology. You just need to redirect it to webdav:// and make any necessary changes.



http://www.jscape.com/blog/what-is-webdav
Comment 1 Elvis Angelaccio 2016-07-12 11:02:59 UTC
Moving to KIO, which is where webdav is handled.
Comment 2 David Faure 2016-07-14 14:26:41 UTC
Did you also report a Nautilus bug saying that they should handle webdav://, KIO syntax? :-)

In any case Elvis is right, if we are to support dav:/ then it's not just dolphin that should support it, e.g. kioclient should support it too, this has to happen one layer below, in kio. Not sure how though.

1) Supporting dav and webdav equally (without redirect) is feasible, but with some mess in kio_http's code
 (e.g. there are quite some if (m_protocol == "webdav" || m_protocol == "webdavs") around, although this could certainly be factorized)

2) The problem is we don't really have the concept of "aliases" for protocols, apart from the KProtocolManager::slaveProtocol mechanism, not sure it still works (FTP handled by HTTP proxies is a rather old concept afaik, so this has probably been untested for a while).

3) One could write a kio_dav ioslave that redirects stat(), listDir(), get() and put() to webdav (there's probably more?).
Ah, either with actual redirection, or using ForwardingSlaveBase (i.e. internal delegation).

In any case I don't have enough motivation (nor even a webdav account) to do this myself, but I'll be happy to review a patch;-)
Comment 3 KDE Neon user 2016-07-14 17:22:35 UTC
I installed Nautilus and verified that it doesn't support the KIO syntax either. Here's the report: https://bugzilla.gnome.org/show_bug.cgi?id=768814

Cryptomator doesn't require you to register an account. It's an offline tool that creates encrypted directories/vaults and uses webDAV locally as a bridge to let you explore those vaults as normal folders.
Comment 4 KDE Neon user 2017-08-11 13:13:20 UTC
From the Github issue (https://github.com/cryptomator/cryptomator/issues/307#issuecomment-321766545):

"On your KDE bug report, you could add a note, that one can test WebDAV clients against http://webdavserver.com/. That site creates temporary dav resources to demo their server library. (Cause David Faure wrote, he doesn't have a WebDAV account anywhere)"
Comment 6 Sergey Ponomarev 2023-03-26 12:35:31 UTC
Nautilus issues (GVFS) https://gitlab.gnome.org/GNOME/gvfs/-/issues/669
Comment 7 Sergey Ponomarev 2023-03-26 12:42:03 UTC
Also into a *.desktop file on a file manager must be added the line:

MimeType=x-scheme-handler/dav;x-scheme-handler/davs;

This will allow to find the program when clicking on the dav://example.com/ url
Comment 8 Sergey Ponomarev 2023-03-26 13:33:13 UTC
Looks like the Dolphin file managers doesn't declare any protocol handlers at all so I created a ticket https://bugs.kde.org/show_bug.cgi?id=467809
Comment 9 Bug Janitor Service 2023-11-21 21:25:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwidgetsaddons/-/merge_requests/225