Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: serveContent should 500 instead of 404 on error #10283
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.
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)