mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
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
This commit is contained in:
parent
ad1fe1c5a8
commit
25f1014ef2
@ -173,7 +173,7 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) error {
|
|||||||
type PropFindFunc func(raw *RawXMLValue) (interface{}, error)
|
type PropFindFunc func(raw *RawXMLValue) (interface{}, error)
|
||||||
|
|
||||||
func NewPropFindResponse(path string, propfind *PropFind, props map[xml.Name]PropFindFunc) (*Response, 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 {
|
if _, ok := props[ResourceTypeName]; !ok {
|
||||||
props[ResourceTypeName] = func(*RawXMLValue) (interface{}, error) {
|
props[ResourceTypeName] = func(*RawXMLValue) (interface{}, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user