phpwebdavself-hostingsabredav

Using sabre/dav server with floccus


[EDIT 2]: TL;DR - floccus can't use Digest Authorization, which was how my sabre/dav server was set up. See this GitHub issue.


I've set up a sabre/dav server on a Raspberry Pi 4 by following the instructions here. When I navigate to my server URL in my browser, I get to the sabre web interface. I can upload files here, and they appear in my public folder.

Now, I'm trying to set up floccus to sync my bookmarks with the server, but I'm hitting a wall. I put in my server URL and credentials just as if I were connecting through my browser, and I specify the path where the bookmarks file should be stored. I save those settings, then click 'Sync Now', but I end up with an error: E018: Couldn't authenticate with the server. There's a button beside the error to download a debug log, but it's an empty file.

Server details

Error message

I've tried various ways of setting the path - a file at the root of my public folder (bookmarks.xbel), a file in a directory further down (bookmarks/bookmarks.xbel), both with and without the file created first, and all of these result in the same error.

Has anyone had any luck with this before that might be able to shine a light on what I'm doing wrong here?

[EDIT]: Using @Marcel Klehr's answer, I managed to track down the response being sent by the server when I try to sync:

<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:sabredav-version>3.2.2</s:sabredav-version>
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No 'Authorization: Digest' header found. Either the client didn't send one, or the server is misconfigured</s:message>
</d:error>

And these are the headers:

Request/response headers

Looks like floccus is using Basic Authorization instead of Digest. I can see in this GitHub issue that Digest is not supported by floccus. I'll try reconfiguring the server to use Basic, and see if that fixes it.

[EDIT 2]: Switching to Basic Authorization fixed the issue. I've marked @Marcel's answer as the Accepted answer, since their guidance helped me track down what was wrong.


Solution

  • You can debug network requests of the extension as follows:

    Firefox Chrome