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
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.
The text was updated successfully, but these errors were encountered:
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
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 iferr1 != nil
the error information is obtained fromerr
, which was assigned from fs.Open at L364 and not from the just received errorerr1
.The text was updated successfully, but these errors were encountered: