Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vvatanabe opened this issue May 3, 2024 · 1 comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted.
Milestone

Comments

@vvatanabe
Copy link

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=https://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=https://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).

@gopherbot gopherbot added this to the Unreleased milestone May 3, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/583055 mentions this issue: webdav: return 409 for PUT without parent collection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted.
Projects
None yet
Development

No branches or pull requests

3 participants