Skip to content

Improve service discovery, implement SD for CalDav#42

Open
dpeukert wants to merge 1 commit into
emersion:masterfrom
dpeukert:discover
Open

Improve service discovery, implement SD for CalDav#42
dpeukert wants to merge 1 commit into
emersion:masterfrom
dpeukert:discover

Conversation

@dpeukert

@dpeukert dpeukert commented Sep 6, 2020

Copy link
Copy Markdown

See #30

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

Comment thread internal/client.go
@dpeukert

dpeukert commented Sep 6, 2020

Copy link
Copy Markdown
Author

Test failure seems unrelated.

Comment thread internal/client.go
serviceUrl := u.String()

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

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread carddav/client.go
Comment thread carddav/client.go Outdated

@emersion emersion left a comment

Copy link
Copy Markdown
Owner

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
Copy Markdown
Author

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

@emersion

Copy link
Copy Markdown
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