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

Improve service discovery, implement SD for CalDav #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dpeukert
Copy link

@dpeukert dpeukert commented Sep 6, 2020

See #30

This is my first time writing Go code, so I apologise in advance for any beginner mistakes I made in this 😃.

@dpeukert
Copy link
Author

dpeukert commented Sep 6, 2020

Test failure seems unrelated.

serviceUrl := u.String()

// Check if the resulting URL hosts a service
req, err := http.NewRequest(http.MethodOptions, serviceUrl, nil)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RFC 6764 section 6 mandates that a PROPFIND request should be made with the username/password set.

Alps has a different requirement: it needs to sanity check the URLs on startup (without any username/password).

To follow the RFC, we could:

  • Take an webdav.HTTPClient to handle auth
  • Change OPTIONS to a PROPFIND request with a DAV:current-user-principal prop
  • Return the DAV:current-user-principal prop

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To accomodate for Alps, we could have an intermediate DiscoverContextURL function that follows the RFC up to and not including the PROPFIND request.

carddav/client.go Outdated Show resolved Hide resolved
Copy link
Owner

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! I left a few comments.

@dpeukert
Copy link
Author

Sorry about the delay on this, I'll try to get the remaining change sorted this weekend.

@emersion
Copy link
Owner

7e07625 adds discovery for CalDAV. What's still missing is the TXT DNS record stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants