From b266d53b15009dce8caf57ea3f6cd11805a7ddb6 Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Wed, 14 Dec 2022 15:19:02 +0100 Subject: [PATCH] Pass capabilites to principal path handler The capabilities are added automatically by the default principal path handlers in the `caldav` and `carddav` packages. However, using the custom handler, they have to be passed in manually. These being missing before was a violation of the RFC and the cause for issues when using e.g. DavX5 client. This is now fixed. --- cmd/tokidoki/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/tokidoki/main.go b/cmd/tokidoki/main.go index 67b50a4..0c3f4b1 100644 --- a/cmd/tokidoki/main.go +++ b/cmd/tokidoki/main.go @@ -70,6 +70,10 @@ func (u *tokidokiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { opts := webdav.ServePrincipalOptions{ CurrentUserPrincipalPath: userPrincipalPath, HomeSets: homeSets, + Capabilities: []webdav.Capability{ + carddav.CapabilityAddressBook, + caldav.CapabilityCalendar, + }, } webdav.ServePrincipal(w, r, &opts)