Closed greensea closed 8 months ago
The server is not guaranteed to return a ContentLength
header field though. It would be better to check for the io.EOF
error instead.
I am confused. The ContentLength is a request attribute, not a response header.
A client may send a request with an empty body, and the http.Request.ContentLength is 0. The patched code check this ContentLength property and make the request treated as an AllProp request.
Sorry, I got things mixed up: the client can omit the Content-Length
header, but still provide a non-empty request body.
Superseded by b043bbd9657b
A request body is not mandatory in PROPFIND request according to https://www.rfc-editor.org/rfc/rfc4918#section-9.1 If the client does not send a request body, the request should be treated as an AllProp request.