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

net/http: serveFile returns the wrong error if f.Stat() fails #12991

Closed
Makpoc opened this issue Oct 19, 2015 · 1 comment
Closed

net/http: serveFile returns the wrong error if f.Stat() fails #12991

Makpoc opened this issue Oct 19, 2015 · 1 comment

Comments

@Makpoc
Copy link

Makpoc commented Oct 19, 2015

At https://github.com/golang/go/blob/master/src/net/http/fs.go#L372-L377 (http/net - serveFile) there's a check for the error, obtained from d, err1 := f.Stat(). However if err1 != nil the error information is obtained from err, which was assigned from fs.Open at L364 and not from the just received error err1.

@bradfitz bradfitz changed the title net/http - serveFile returns the wrong error if f.Stat() fails net/http: serveFile returns the wrong error if f.Stat() fails Oct 19, 2015
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Oct 24, 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

2 participants