go-webdav
go-webdav copied to clipboard
webdav: Check status code in `Open(...)`
trafficstars
The Open function doesn't check the HTTP status code. Therefore it is not possible to detect errors, e.g. 404.
My suggestion is to only allow 200 status code by default.
Ouch, that's definitely an oversight. It seems like we're missing checks for many requests, not just Open().
Actually, internal.Client.Do does check for HTTP errors already.