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

Comments

Projects
None yet
2 participants
@Makpoc
Copy link

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

This comment has been minimized.

Copy link

commented Oct 19, 2015

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

@bradfitz bradfitz closed this in a8645e2 Oct 19, 2015

@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.
You can’t perform that action at this time.