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: error when listing with Dir on Windows #13126

Closed
HNoreick opened this issue Nov 2, 2015 · 1 comment
Closed

x/net/webdav: error when listing with Dir on Windows #13126

HNoreick opened this issue Nov 2, 2015 · 1 comment

Comments

@HNoreick
Copy link

HNoreick commented Nov 2, 2015

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

@rakyll rakyll changed the title Error in x/net/webdav on Windows x/net/webdav: error when listing with Dir on Windows Nov 2, 2015
@rakyll rakyll added this to the Unreleased milestone Nov 2, 2015
@gopherbot
Copy link

CL https://golang.org/cl/16799 mentions this issue.

@golang golang locked and limited conversation to collaborators Dec 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants