go-webdav icon indicating copy to clipboard operation
go-webdav copied to clipboard

webdav: Check status code in `Open(...)`

Open coffeemakr opened this issue 10 months ago • 1 comments
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.

coffeemakr avatar Jan 08 '25 11:01 coffeemakr

Ouch, that's definitely an oversight. It seems like we're missing checks for many requests, not just Open().

emersion avatar Jan 08 '25 12:01 emersion

Actually, internal.Client.Do does check for HTTP errors already.

emersion avatar Oct 30 '25 19:10 emersion