You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Go are you using (go version)?
1.5.1
What operating system and processor architecture are you using?
windows 7; Intel i3
What did you do?
testing x/net/webdav package on Windows
What did you expect to see?
A listing of Files of the webdav root inside explorer
What did you see instead?
an error .-)
The sample with the mem filesystem worked fine, but the Dir Filesystem doesn't.
The error is caused by a setting of a struct at line 134 of file prop.go
The comment says:
...
105: // dir is true if the property applies to directories.
106: dir bool
...
...
131: xml.Name{Space: "DAV:", Local: "getcontenttype"}: {
132: findFn: findContentType,
133: // dir: true, // <- this setting causes the error
134: dir: false, // <- setting it to false works fine
135: },
...
If dir is true the findContenttype is called for a Directory and that causes an error. I solved the problem this way and i don't know wether a directory could have a Content-Type. I don' think so.
thanks, Horst Noreick
Edit: the finename prop.go
The text was updated successfully, but these errors were encountered:
rakyll
changed the title
Error in x/net/webdav on Windows
x/net/webdav: error when listing with Dir on Windows
Nov 2, 2015
Fixesgolang/go#13126
- GET/HEAD/POST method should not allowed for directory
- Ignore EOFs while detecting the file.
Change-Id: I5ce345408a5ea4ec0dc993631122e6c79fc64398
Reviewed-on: https://go-review.googlesource.com/16799
Reviewed-by: Robert Stepanek <robert.stepanek@gmail.com>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (go version)?
1.5.1
What operating system and processor architecture are you using?
windows 7; Intel i3
What did you do?
testing x/net/webdav package on Windows
What did you expect to see?
A listing of Files of the webdav root inside explorer
What did you see instead?
an error .-)
The sample with the mem filesystem worked fine, but the Dir Filesystem doesn't.
The error is caused by a setting of a struct at line 134 of file prop.go
The comment says:
...
105: // dir is true if the property applies to directories.
106: dir bool
...
...
131: xml.Name{Space: "DAV:", Local: "getcontenttype"}: {
132: findFn: findContentType,
133: // dir: true, // <- this setting causes the error
134: dir: false, // <- setting it to false works fine
135: },
...
If dir is true the findContenttype is called for a Directory and that causes an error. I solved the problem this way and i don't know wether a directory could have a Content-Type. I don' think so.
thanks, Horst Noreick
Edit: the finename prop.go
The text was updated successfully, but these errors were encountered: