http - 500 Internal Server Error 是否总是意味着网络服务器错误?

标签 http http-response-codes http-status-code-500

我总是遇到 500 Internal Server Error 是网络服务器错误,随后将其记录为错误。 但是,我被告知 500 Internal Server Error 也可能是应用程序错误。在这种情况下,发生这种情况时它似乎不会登录到网络服务器。

在某些情况下,500 内部服务器错误不会将问题报告到网络服务器错误日志中是否合理?

www.w3.org 报告:

Internal Error 500

The server encountered an unexpected condition which prevented it from fulfilling the request.

最佳答案

根据spec , HTTP 5xx 状态代码定义为服务器端 错误。任何导致 HTTP 5xx 错误的客户端问题都是对 HTTP 状态代码的不正确使用。阻止请求完成的客户端问题应导致 HTTP 4xx 状态代码。

6.6 Server Error 5xx

The 5xx (Server Error) class of status code indicates that the server is aware that it has erred or is incapable of performing the requested method. ...

-- https://www.rfc-editor.org/rfc/rfc7231#section-6.6

6.5 Client Error 4xx

The 4xx (Client Error) class of status code indicates that the client seems to have erred. ...

-- https://www.rfc-editor.org/rfc/rfc7231#section-6.5

关于http - 500 Internal Server Error 是否总是意味着网络服务器错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39149729/

相关文章:

http - Mule HTTP POST 请求返回 302 页面重定向

QT http 设置用户代理

ruby-on-rails - Rails HTTP-POST

php - 为什么在 PHP 中的函数 header() 之后调用的函数 http_response_code() 表现得很奇怪?

Java - 到立交桥服务器的 HttpURLConnection

python - 如何处理 python django Rest-framework-api 格式错误的 UUID 而不是 500?

php - Docker-compose(CakePHP 2x 和 MySQL)抛出 PHP fatal error

http - 选项请求身份验证

java - 尝试获取响应代码时代码挂起

api - Symfony 4 内部服务器错误 : Context visitingStack not working well