wrong principal-url used, get "404 Not Found"
Opened this issue · 3 comments
When i'm trying to start caldr -r
i get error 404 Not Found
.
I'm using NextCloud as a CalDav server, i looked in the access.log in the server and see this request: GET /remote.php/dav/principals/myuser HTTP/1.1" 404 31 "-" "HTTPie/3.2.1
.
NextCloud uses this principal-url: /remote.php/dav/principals/users/myuser
.
You should request principal-url first as described in RFC 6764.
e.g. request: <d:propfind xmlns:d="DAV:"><d:prop><d:current-user-principal /></d:prop></d:propfind>
Hey there, thanks for reporting and pointing out the URL that might work! While I could implement a fix with the URL you mentioned I couldn't really test it as I'm not running a NextCloud CalDav server. If you're able to, feel free to draft a PR, test it on your instance and push it when you have a version that's working for your use case!
I am encountering the same issue.
After some digging around, I believe it's actually not the applications responsibility to request principal-url, but rather the responsibility of emersion/go-webdav
, which is used to connect to the DAV server.
More specifically, RFC: only support a single path layout? #100 describes what is still under development and what it would take to get there.
Hope this helps to clarify things.
Specifically for Nextcloud endpoints
If you like, though I am sure that this is purely specific to Nextcloud and/or other iOS/macOS CalDav addresses, you can use that url (instead of your primary address - see picture below) and just search for the calendar homeset at the endpoint, without appending 'principals/username' to it here.Very much not what you would like to do in the actual application, though might be nice for those who build from source :)
I also had problems with nextcloud, but I think the best fix is to replace nextcloud with something else.