Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong principal-url used, get "404 Not Found" #1

Open
Junker opened this issue Dec 30, 2022 · 3 comments
Open

wrong principal-url used, get "404 Not Found" #1

Junker opened this issue Dec 30, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Junker
Copy link

Junker commented Dec 30, 2022

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>

@mrusme
Copy link
Owner

mrusme commented Dec 30, 2022

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!

@mrusme mrusme added the bug Something isn't working label Dec 30, 2022
@tdpeuter
Copy link

tdpeuter commented Oct 8, 2023

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 :)

Nextcloud: Difference between primary and iOS address

@ehmry
Copy link

ehmry commented Feb 21, 2024

I also had problems with nextcloud, but I think the best fix is to replace nextcloud with something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants