mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
internal: don't send an empty error element
According to RFC 4918 section 14.5, the error element can't be empty.
This commit is contained in:
parent
3f8b212b0d
commit
d8a8af0448
@ -143,9 +143,7 @@ func NewErrorResponse(path string, err error) *Response {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var errElt *Error
|
var errElt *Error
|
||||||
if !errors.As(err, &errElt) {
|
errors.As(err, &errElt)
|
||||||
errElt = &Error{}
|
|
||||||
}
|
|
||||||
|
|
||||||
href := Href{Path: path}
|
href := Href{Path: path}
|
||||||
return &Response{
|
return &Response{
|
||||||
|
Loading…
Reference in New Issue
Block a user