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
f, err := fs.Open(name)
if err != nil {
// TODO expose actual error?
NotFound(w, r)
return
}
defer f.Close()
d, err1 := f.Stat()
if err1 != nil {
// TODO expose actual error?
NotFound(w, r)
return
}
This bug is about those TODOs.
We should send a 500 instead of a 404. Sending the actual error text is probably too risky (might contain sensitive information). Instead, we could just log it.
The text was updated successfully, but these errors were encountered:
Brad it's not quite correct, if error is permission-related, the web-servers normally give 403. Non-existing files return 404.
I can imagine there should be errors that should result in 500 but normally two above should handle most of the cases (*CGI, proxying and SSI are usual suspects for 500)
http's
fs.go
contains:This bug is about those TODOs.
We should send a 500 instead of a 404. Sending the actual error text is probably too risky (might contain sensitive information). Instead, we could just log it.
The text was updated successfully, but these errors were encountered: