lookfirst / sardine

an easy to use webdav client for java
Other
579 stars 185 forks source link

Sardine logs a confusing warning when the response doesn't have Content-Length #318

Closed nigredo-tori closed 4 years ago

nigredo-tori commented 4 years ago

It's possible for the response to not have an explicit Content-Length for one reason or another - for example, when using chunked Transfer-Encoding: chunked. At the moment this leads to alarming warnings in the log:

Feb 18, 2020 10:40:38 AM com.github.sardine.impl.io.HttpMethodReleaseInputStream close
WARNING: Abort connection for response HttpResponseProxy{HTTP/1.1 200 OK [Date: Tue, 18 Feb 2020 03:40:38 GMT, Transfer-encoding: chunked] ResponseEntityProxy{[Chunked: true]}}

We should get rid of those.

I've created a reproducible example here: https://github.com/nigredo-tori/various-examples/tree/sardine-no-content-length.