What are the common HTTP status codes? The explanation in this article is too detailed.

1xx: Provisional Response (Informational)

The status code that requires the requester to continue the operation, indicating that the server is accepting the request.

  • 100: The requester should continue to make the request. The server returns this code to indicate that it has received the initial request and is waiting for the rest.
  • 101: Switch protocol, the requester has asked the server to switch the protocol, the server has confirmed and is ready to switch

2xx: Success status code (Success)

Success status code, the client request has been successfully accepted. (The code at the beginning of 2 is generally used by the developer to see if the data is requested or sent successfully when debugging.)

  • 200: (OK) The server has successfully processed the request. Usually, this means that the server provides the requested web page, and the response documents for GET and POST requests follow.
  • 201: (Created) has been created, the request is successful and the server has created a new resource, the Location header gives its URL.
  • 203: (Accepted) Unauthorized information. The server has successfully processed the request, but the returned information may come from another source.
  • 204: (Non-Authoritative Information) No content, the server successfully processed the request, but did not return any content
  • 205: (Reset Content) There is no new content, but the browser should reset the content it displays. Used to force the browser to clear the form input.
  • 206: (Partial Content) The client sent a GET request with a Range header (partitioned request), and the server successfully processed part of the GET request.

3xx: Redirection status code (Redirection)

The client needs to do further operations to complete the request.

  • 300: (Multiple Choices) multiple choices, in response to requests, the server can perform multiple operations. The server can select an operation based on the requester (user agent), or provide a list of operations for the requester to choose.
  • 301: (Moved Permanently) Permanently moved, the requested webpage has been permanently moved to a new location. When the server returns this response (response to a GET or HEAD request), it will automatically redirect the requester to the new location.
  • 302: (Moved Temporatily) is similar to 301, but the movement is temporary. The server currently responds to requests from web pages in different locations, but the requester should continue to use the original location for future requests.
  • 303: (See Other) To view other locations, the server returns this code when the requester should use separate GET requests for different locations to retrieve the response. That is, the main meaning of the status code is to handle the situation where the POST request is redirected to the GET request
  • 304: (Not Modified) has not been modified, since the last request, the requested webpage has not been modified. When the server returns this response, the content of the web page will not be returned.
  • 305: (Use Proxy) Use a proxy, the requester can only use the proxy to access the requested webpage. If the server returns this response, it also indicates that the requester should use a proxy.
  • 307: (Temporary Redirect) Temporary Redirect. The server currently responds to requests from web pages in different locations, but the requester should continue to use the original location for future requests.

4xx: Client Error

An error in the client request caused the server to fail to complete the request normally.

  • 400 (Bad Request) Bad request, the server does not understand the syntax of the request.
  • 401 (Unauthorized) Unauthorized, access denied, request requires authentication. For web pages that require login, the server may return this response.
  • 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-Access is denied by the URL authorization policy on the Web server.
  • 403 (Forbidden) Forbidden access, the server rejected the request.
  • 404 (Not Found) not found, the server cannot find the requested webpage. It is a common status code.
  • 405 (Method Not Allowed) The method is disabled, and the method specified in the request is disabled.
  • 406 (Not Acceptable) Not accept, the specified resource has been found, but the requested content cannot be used to respond to the requested webpage
  • 407 (Proxy Authentication Required) requires proxy authorization verification. This status code is similar to 401 (unauthorized), but specifies that the requester should be authorized to use the proxy.
  • 408 (Request Timeout) Request timeout, the server timed out while waiting for the request.
  • 409 (Conflict) Conflict, the server has a conflict while completing the request. The server must include information about the conflict in the response.
  • 410 (Gone) has been deleted, if the requested resource has been permanently deleted, the server will return this response. A return of 410 indicates that the document has permanently left the specified location, and 404 indicates that the document is not available due to unknown reasons.
  • 411 (Length Required) requires a valid length, and the server does not accept requests without a valid content length header field.
  • 412 (Precondition Failed) The precondition is not met, and the server does not meet one of the preconditions set by the requester in the request.
  • 413 (Request Entity Too Large) The request entity is too large and the server cannot process the request because the request entity is too large and exceeds the processing capacity of the server.
  • 414 (Request URI Too Long) The requested URI (usually a URL) is too long for the server to process.
  • 415 (Unsupported media type) The requested format is not supported by the requested page.
  • 416 (Requested Range Not Satisfiable) The requested range does not meet the requirements. If the page cannot provide the requested range, the server will return this status code.
  • 417 (Expected value not met) The server did not meet the requirements of the "expected" request header field.
  • 423 Locked error.

5xx: Server Error

Server error failed to successfully process server request

  • 500 (Internal Server Error) Internal server error. The server encountered an error and could not complete the request.
  • 501 (Not Implemented) has not been implemented yet, and the server does not have the function to complete the request. For example, this code may be returned when the server does not recognize the request method
  • 502 (Bad Gateway) Bad Gateway. The server is acting as a gateway or proxy and received an invalid response from the upstream server.
  • 503 (Service Unavailable) The service is unavailable, and the server is currently unavailable (due to overload or downtime for maintenance). Usually, this is only a temporary state.
  • 504 (Gateway Timeout) The gateway has timed out. The server is acting as a gateway or proxy, but it did not receive a request from the upstream server in time.
  • 505 (HTTP Version Not Supported) The HTTP version is not supported, and the server does not support the HTTP protocol version used in the request.

Guess you like

Origin blog.csdn.net/Q274948451/article/details/109400529