x/net/webdav: PUT handler does not support conditional requests using If-... headers #44492
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Example using
If-Unmodified-Since
: https://play.golang.org/p/yf4YRknvXReExample using
If-Match
: https://play.golang.org/p/a6nl_v-R_vENote: It was necessary to run the examples twice on the playground, the first run timed out during compilation.
These types of conditional requests are useful to avoid the lost update problem without using WebDAV locks.
What did you expect to see?
After running any of the provided examples I expect both GET and PUT requests failing with
412 Precondition Failed
-- producing the following output:What did you see instead?
The second request (PUT) succeeded:
The text was updated successfully, but these errors were encountered: