Detailed explanation of HTTP request return status code

When a user attempts to access content over HTTP on a server that is running Internet Information Services (IIS), IIS returns a numeric code that indicates the status of the request. Status codes can indicate whether a specific request was successful or not, and can reveal the exact reason why the request failed.

1xx - Informational Tips

These status codes indicate provisional responses. Clients should be prepared to receive one or more 1xx responses before receiving a regular response.
100 - Continue The initial request has been accepted, and the client should continue sending the rest of the request. (New in HTTP 1.1)
· 101 - Switching Protocols The server will comply with the client's request to switch to another protocol (new in HTTP 1.1)

2xx - Success

This type of status code indicates that the server successfully accepted the client's request.
200 - OK Everything is OK, followed by response documents for GET and POST requests.
201 - Created The server has created the document, and the Location header gives its URL.
202 - Accepted The request has been accepted, but processing has not yet completed.
203 - Non-Authoritative Information The document has been returned normally, but some response headers may be incorrect because a copy of the document is used, non-authoritative information (new in HTTP 1.1).
204 - No Content There is no new document, the browser should continue to display the original document. This status code is useful if the user periodically refreshes the page and the servlet can determine that the user's document is sufficiently up-to-date.
205 - Reset Content There is no new content, but the browser should reset what it is displaying. Used to force the browser to clear form inputs (new in HTTP 1.1).
206 - Partial Content The client sent a GET request with a Range header and the server completed it (new in HTTP 1.1).

3xx - Redirect

The client browser must take more action to fulfill the request. For example, the browser may have to request a different page on the server, or repeat the request through a proxy server.
· 300 - Multiple Choices The document requested by the client can be found in multiple locations that are already listed in the returned document. If the server wants to propose a preference, it should indicate it in the Location response header.
301 - Moved Permanently The document requested by the client is elsewhere, the new URL is given in the Location header, and the browser should automatically visit the new URL.
302 - Found Similar to 301, but the new URL should be considered a temporary replacement, not a permanent one. Note that the corresponding status message in HTTP 1.0 is "Moved Temporatily". When this status code occurs, the browser can automatically access the new URL, so it is a useful status code. Note that this status code can sometimes be used instead of 301. For example, if the browser incorrectly requests http://host/~user (missing the trailing slash), some servers will return 301, while others will return 302. Strictly speaking, we can only assume that the browser will automatically redirect only if the original request was a GET. See 307.
303 - See Other Similar to 301/302, except that if the original request was a POST, the redirect target document specified by the Location header should be fetched via GET (new in HTTP 1.1).
304 - Not Modified The client has buffered documents and made a conditional request (usually providing an If-Modified-Since header to indicate that the client only wants documents newer than the specified date). The server tells the client that the original buffered document can still be used.
· 305 - Use Proxy The document requested by the client should be fetched through the proxy server specified by the Location header (new in HTTP 1.1).
307 - Temporary Redirect is the same as 302 (Found). Many browsers will incorrectly redirect in response to a 302 response, even if the original request was a POST, even though it can actually only redirect if the response to a POST request was a 303. For this reason, HTTP 1.1 added 307 to more clearly distinguish several status codes: when a 303 response appears, the browser can follow redirected GET and POST requests; if it is a 307 response, the browser can only follow Redirection for GET requests. (New in HTTP 1.1)

4xx - Client Error

An error occurred and the client seems to have a problem. For example, the client requests a page that does not exist, and the client did not provide valid authentication information.

400 - Bad Request The request has a syntax error.

401 - Unauthorized Access Denied, the client attempted unauthorized access to a password-protected page. The response will contain a WWW-Authenticate header, according to which the browser displays the username/password dialog, and then makes the request again after filling in the appropriate Authorization headers. IIS defines a number of different 401 errors that indicate a more specific cause of the error. These specific error codes are displayed in the browser but not in the IIS log:
· 401.1 - Login failed.
401.2 - Login failed due to server configuration.
· 401.3 - Unauthorized due to ACL restrictions on resources.
401.4 - Filter authorization failed.
401.5 - ISAPI/CGI application authorization failed.
· 401.7 – 访问被 Web 服务器上的 URL 授权策略拒绝。这个错误代码为 IIS 6.0 所专用。

· 403 - Forbidden 资源不可用。服务器理解客户的请求,但拒绝处理它。通常由于服务器上文件或目录的权限设置导致。禁止访问:IIS 定义了许多不同的 403 错误,它们指明更为具体的错误原因:
· 403.1 - 执行访问被禁止。
· 403.2 - 读访问被禁止。
· 403.3 - 写访问被禁止。
· 403.4 - 要求 SSL。
· 403.5 - 要求 SSL 128。
· 403.6 - IP 地址被拒绝。
· 403.7 - 要求客户端证书。
· 403.8 - 站点访问被拒绝。
· 403.9 - 用户数过多。
· 403.10 - 配置无效。
· 403.11 - 密码更改。
· 403.12 - 拒绝访问映射表。
· 403.13 - 客户端证书被吊销。
· 403.14 - 拒绝目录列表。
· 403.15 - 超出客户端访问许可。
· 403.16 - 客户端证书不受信任或无效。
· 403.17 - 客户端证书已过期或尚未生效。
· 403.18 - 在当前的应用程序池中不能执行所请求的 URL。这个错误代码为 IIS 6.0 所专用。
· 403.19 - 不能为这个应用程序池中的客户端执行 CGI。这个错误代码为 IIS 6.0 所专用。
· 403.20 - Passport 登录失败。这个错误代码为 IIS 6.0 所专用。

· 404 - Not Found 无法找到指定位置的资源。这也是一个常用的应答。
· 404.0 -(无) – 没有找到文件或目录。
· 404.1 - 无法在所请求的端口上访问 Web 站点。
· 404.2 - Web 服务扩展锁定策略阻止本请求。
· 404.3 - MIME 映射策略阻止本请求。

· 405 - Method Not Allowed 请求方法(GET、POST、HEAD、Delete、PUT、TRACE等)对指定的资源不适用,用来访问本页面的 HTTP 谓词不被允许(方法不被允许)(HTTP 1.1新)
· 406 - Not Acceptable 指定的资源已经找到,但它的MIME类型和客户在Accpet头中所指定的不兼容,客户端浏览器不接受所请求页面的 MIME 类型(HTTP 1.1新)。
· 407 - Proxy Authentication Required 要求进行代理身份验证,类似于401,表示客户必须先经过代理服务器的授权。(HTTP 1.1新)
· 408 - Request Timeout 在服务器许可的等待时间内,客户一直没有发出任何请求。客户可以在以后重复同一请求。(HTTP 1.1新)
· 409 - Conflict 通常和PUT请求有关。由于请求和资源的当前状态相冲突,因此请求不能成功。(HTTP 1.1新)
· 410 - Gone 所请求的文档已经不再可用,而且服务器不知道应该重定向到哪一个地址。它和404的不同在于,返回407表示文档永久地离开了指定的位置,而404表示由于未知的原因文档不可用。(HTTP 1.1新)
· 411 - Length Required 服务器不能处理请求,除非客户发送一个Content-Length头。(HTTP 1.1新)
· 412 - Precondition Failed 请求头中指定的一些前提条件失败(HTTP 1.1新)。
· 413 – Request Entity Too Large 目标文档的大小超过服务器当前愿意处理的大小。如果服务器认为自己能够稍后再处理该请求,则应该提供一个Retry-After头(HTTP 1.1新)。
· 414 - Request URI Too Long URI太长(HTTP 1.1新)。
· 415 – 不支持的媒体类型。
· 416 – Requested Range Not Satisfiable 服务器不能满足客户在请求中指定的Range头。(HTTP 1.1新)
· 417 – 执行失败。
· 423 – 锁定的错误。

5xx - 服务器错误

服务器由于遇到错误而不能完成该请求。

· 500 - Internal Server Error 服务器遇到了意料不到的情况,不能完成客户的请求。

· 500.12 - 应用程序正忙于在 Web 服务器上重新启动。
· 500.13 - Web 服务器太忙。
· 500.15 - 不允许直接请求 Global.asa。
· 500.16 – UNC 授权凭据不正确。这个错误代码为 IIS 6.0 所专用。
· 500.18 – URL 授权存储不能打开。这个错误代码为 IIS 6.0 所专用。
· 500.100 - 内部 ASP 错误。

· 501 - Not Implemented 服务器不支持实现请求所需要的功能,页眉值指定了未实现的配置。例如,客户发出了一个服务器不支持的PUT请求。

· 502 - Bad Gateway 服务器作为网关或者代理时,为了完成请求访问下一个服务器,但该服务器返回了非法的应答。 亦说Web 服务器用作网关或代理服务器时收到了无效响应。

· 502.1 - CGI 应用程序超时。
· 502.2 - CGI 应用程序出错。

· 503 - Service Unavailable 服务不可用,服务器由于维护或者负载过重未能应答。例如,Servlet可能在 数据库 连接池已满的情况下返回503。服务器返回503时可以提供一个 Retry-After头。这个错误代码为 IIS 6.0 所专用。

· 504 - Gateway Timeout 网关超时,由作为代理或网关的服务器使用,表示不能及时地从远程服务器获得应答。(HTTP 1.1新) 。

· 505 - HTTP Version Not Supported 服务器不支持请求中所指明的HTTP版本。(HTTP 1.1新)。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325397092&siteId=291194637