Skip to content

x/net/webdav: PUT with missing intermediate collection gave 404, MUST be 409 [RFC4918:S9.7.1]) #67150

@vvatanabe

Description

@vvatanabe

Go version

go version go1.22.2 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/vvatanabe/Library/Caches/go-build'
GOENV='/Users/vvatanabe/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/vvatanabe/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/vvatanabe/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.22.2/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.2/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.2'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/vvatanabe/go/src/github.com/golang/net/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/gq/yp0c_j9j6q92thtm16lbd78m0000gn/T/go-build626879434=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Run the litmus WebDAV testsuite against the x/net/webdav test server at https://github.com/golang/net/blob/master/webdav/litmus_test_server.go:

$ go run webdav/litmus_test_server.go
$ git clone https://github.com/notroj/litmus.git
$ cd litmus
$ make URL=http://localhost:9999/ check

The following playground can also be used https://go.dev/play/p/DJB2UX3d2rL .

What did you see happen?

Test case (5. put_no_parent) fails when running litmus test:

$ make URL=http://localhost:9999/ check
-> running `basic':
 0. init.................. pass
 1. begin................. pass
 2. options............... pass
 3. put_get............... pass
 4. put_get_utf8_segment.. pass
 5. put_no_parent......... FAIL (PUT with missing intermediate collection gave 404, MUST be 409 [RFC4918:S9.7.1])

What did you expect to see?

Expected basic test 5. put_no_parent to succeed, RFC4918:S9.7.1 clearly states that a 409 must be returned in this case.

A PUT that would result in the creation of a resource without an appropriately scoped parent collection MUST fail with a 409 (Conflict).

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.FrozenDueToAge

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions