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.
This commit is contained in:
Conrad Hoffmann 2022-12-14 15:19:02 +01:00
parent c5c9901b9d
commit b266d53b15

View File

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