package server import "net/http" // calendar-access normally asserts RFC 4791 conformance, which our limited // implementation does not provide. Only advertise it for an explicitly opted-in // compatibility credential (e.g. OneTask's OPTIONS gate); never infer from UA. func (s *Server) setDAVCapabilities(w http.ResponseWriter, r *http.Request, actor, credential string) { w.Header().Set("DAV", "1") if credential == "" { return } if enabled, err := s.store.DAVCalendarAccessCompat(r.Context(), s.domainUUIDForRequest(r), actor, credential); err == nil && enabled { w.Header().Set("DAV", "1, calendar-access") w.Header().Set("X-PagesWiki-CalDAV-Profile", "limited-compatibility") } }