Yesterday I spent the day adding a WebDAV module to Phoebe, my Gemini wiki. Luckily, I had many code pieces already lying around. In 2005 (?) I had written a WebDAV extension for Oddmuse, my regular wiki. Back then, I found that the command-line client cadaver is the best one to use. I knew that in theory, file managers often offer a way to mount WebDAV-enabled servers, so I tried Gnome Files, too. It seems to work, surprisingly! Back then I had only tried the Microsoft Windows Explorer and the macOS Finder.
Once the WebDAV-enabled server is mounted, other applications can open these files as if they’re local files. The path might look weird, but that’s it.
Gnome Text Editor editing a page
As soon as I had it working, however, I ran into an issue: what about the token? I wanted to add some form of authentication. Easy, I thought. I will add Basic Authentication to the server. It sends username and password in the clear, but we always use HTTPS to encrypt our traffic, so we’re fine.
When I tested it using cadaver, no problem. It is a dedicated WebDAV client. It knows about authentication requirements, so it asks me for username and password.
The problem is my text editor. It doesn’t know about authentication, or if it does, it can’t handle it.
Gnome Text Editor with an error message
This makes sense to me: the WebDAV server was mounted without authentication, and so when the text editor attempts to write to it, and it doesn’t know how to authenticate, it fails. How does one solve this?
Mounting davs://name:password@localhost:1965/ did not work. I guess Gnome Files decided that the root of the server didn’t ask for authentication so it immediately forgot about the password. I’ll have to think about this some more.
#WebDAV
(Please contact me if you want to remove your comment.)
⁂
Thinking about it some more, I realized that I needed to provide a URL that immediately requires authentication for Gnome Files to work. And now it does. 🤩
– Alex 2021-10-18 21:43 UTC
---
Things to look at:
– Alex 2021-10-19 11:56 UTC
---
Update:
– Alex 2021-10-21 06:44 UTC
---
Update:
– Alex 2021-10-21 22:28 UTC
---
Update:
– Alex 2021-10-22 21:19 UTC
---
Update:
– Alex 2021-10-23 10:53 UTC