From 25f1014ef25f32967c8e17da16fba6f5c78886c0 Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Thu, 8 Feb 2024 22:36:58 +0100 Subject: [PATCH] internal: no status element in propstat responses Responses that contain propstat elements do not contain their own top-level status element, only the status elements inside the propstat element. See https://datatracker.ietf.org/doc/html/rfc4918#section-14.24 or any of the examples for PROPFIND/PROPPATCH, starting e.g. here: https://datatracker.ietf.org/doc/html/rfc4918#section-9.1.3 --- internal/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/server.go b/internal/server.go index 85ed1bc..dd94840 100644 --- a/internal/server.go +++ b/internal/server.go @@ -173,7 +173,7 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) error { type PropFindFunc func(raw *RawXMLValue) (interface{}, error) func NewPropFindResponse(path string, propfind *PropFind, props map[xml.Name]PropFindFunc) (*Response, error) { - resp := NewOKResponse(path) + resp := &Response{Hrefs: []Href{Href{Path: path}}} if _, ok := props[ResourceTypeName]; !ok { props[ResourceTypeName] = func(*RawXMLValue) (interface{}, error) {