Support setting capabilities in ServePrincipal()
This is done properly in the carddav and caldav packages, but the custom function does not know what the user intends to serve, so it must be passed in from the user. Without this, certain clients (e.g. DAVx5) will be unable to discover endpoints served this way. Also slightly extend the supported methods returned on OPTIONS requests. REPORT is properly supported, the others are mostly for not giving clients the impression that the resources are read-only.
This commit is contained in:
committed by
Simon Ser
parent
ac9af45270
commit
0456b28ba3
@@ -12,6 +12,8 @@ import (
|
||||
"github.com/emersion/go-webdav/internal"
|
||||
)
|
||||
|
||||
var CapabilityCalendar = webdav.Capability("calendar-access")
|
||||
|
||||
func NewCalendarHomeSet(path string) webdav.BackendSuppliedHomeSet {
|
||||
return &calendarHomeSet{Href: internal.Href{Path: path}}
|
||||
}
|
||||
|
Reference in New Issue
Block a user