1.1 message 1xx (informational 1xx)
the Code indicates a temporary response. A temporary response is composed of status-line and optional titles, and is terminated by a blank line. No 1xx status code is defined in HTTP/1.0, so they are not legal responses to HTTP/1.0 requests. In fact, they are mainly used for lab purposes, which is beyond the scope of this document.
1.2 success 2XX (successful 2XX)
Indicates that the client request is successfully received, understood, and accepted.
200 OK
The request is successful. The response information depends on the method used by the request, as follows:
The resource to be requested by get has been placed in the response entity.
The head has no entity, and only the title information is included in the response.
Post object (description or result containing the operation ).
201 created
After the request is completed, the new resource is created. The URI of the newly created resource can be obtained in the response object. The original server should create the resource before sending the status code. If this operation cannot be completed immediately, the server must give a prompt in the response body when the resource is available. Otherwise, the server should respond to 202 (acceptable ).
In the method defined in this article, only post can create resources.
202 accepted
The request is accepted, but the processing has not been completed. The request may not be completed and may be interrupted at any time. In this case, there is no way to resend the status code in an asynchronous operation.
202 there is no obligation to respond. The purpose is to allow the server to respond to requests from other processes (such as running once a day, based on the batch processing process ).
The entities returned in some responses include the status indication of the current request, the status monitor pointer, or the user's evaluation information on whether the request can be implemented.
204 NO content
The server has implemented the request, but no new information is returned. If the customer is a user agent, do not update the document view for this. This response mainly aims to input script statements and perform other operations without affecting the activation of the document view by the user agent. This response may also contain new meta information in the form of entity titles, which can be used by the documents in the active view of the current user agent.
1.3Redirection (redirection 3xx)
This type of Status Code indicates that the user agent needs to perform further operations to complete the request. These operations can be implemented by the user agent only when the followed request is get or head, instead of interacting with the user. The user agent never performs more than five redirection operations on the request, which may lead to an infinite loop.
300 multiple choices
This status code is not used by HTTP/1.0 applications Program It is used directly, but serves as the default explanation for 3xx type responses. Multiple available requested resources exist.
Unless it is a head request, the response entity must include the character list and location information of these resources. The user or user agent determines which one is the most suitable.
If the server has a preferred choice, it should store the corresponding URL Information in the location field, and the user agent will automatically redirect according to the value of this field.
301 moved permanently
A permanent URL will be allocated to the requested resource, so that you can access this resource through this URL in the future. The client with the link editing function will automatically update the request URI based on the new link returned by the server as much as possible. The new URL must be specified by the location field in the response. Unless it is a head request, the entity body to be responded must include a brief description of the new URL hyperlink.
If the post method is used to send a request, the 301 response status code is received. In this case, unless confirmed by the user, the user agent does not need to redirect the request automatically, because this will change the environment in which the request has been sent.
Note: When the POST request is automatically redirected after the 301 status code is received, some existing user proxies mistakenly Change it to get requests.
302 moved temporarily
The requested resource is temporarily saved in a different URL. Because redirection is sometimes changed, the client should continue to use the request URI to send future requests. The new URL must be specified by the location field in the response. Unless it is a head request, the entity body to be responded must include a brief description of the new URL hyperlink.
If the post method is used to send a request, the 302 response status code is received. In this case, unless confirmed by the user, the user agent does not need to redirect the request automatically, because this will change the environment in which the request has been sent.
Note: When the POST request is automatically redirected after the 302 status code is received, some existing user proxies mistakenly Change it to get requests.
304 not modified
If the client successfully executes the conditional GET request and the corresponding file has not been updated since the date specified by the IF-modified-since domain, the server should respond to this status code, instead of sending the entity body to the client. The Response Header domain should only contain some relevant information, such as the cache manager and the modification irrelevant to the last-modified Date of the entity. Examples of related subject domains include date, server, and expiration time. Whenever the Domain value given in the 304 response changes, the cache should update the cached entity.
1.4Client error 4xx
The status code of the 4xx class indicates that an error occurs on the client. If the request has not been completed when the client receives the 4xx code, it should immediately terminate sending data to the server. In addition to responding to head requests, the server must include an explanation of the error status in the response entity, whether the error is temporary or permanent. These Status Codes apply to any request method.
Note: If the client is sending data, the TCP implementation of the server should be careful to ensure that the client receives the response packet before closing the input connection. If the client still sends data to the server after it is disabled, the server will send a reset packet to the client to clear the input buffer that has not been processed by the client, so as to terminate the reading and interpreting activities of the HTTP application.
400 Bad request)
If the request syntax is incorrect, the server cannot understand it. The client should not repeatedly send the request to the server before making changes to the request.
401 Unauthorized)
User authorization is required for the request. The WWW-Authenticate header field (section 10.16) in the response should prompt the user to request resources in an authorized manner. The client should use the appropriate authorization title domain (section 10.2) to repeat the request. If the request contains the authorization trust information, the 401 response indicates that the authorization is denied. If the user agent returns Status Code 401 after multiple attempts, the user should check the response entity because the entity contains some dynamic information. HTTP access authorization will be explained in section 11.
403 Forbidden)
The server understands the request, but rejects the request. Authorization does not help. The client should stop sending this request repeatedly. If the head request method is not used and the server is willing to publish the reason for the request being not implemented, the server will write the reason for rejection in the response entity. This status code is generally used when the server does not want to disclose the details of the request being rejected or no other response is available.
404 Not found)
The server does not find the resource that matches the request URI. The 404 Status Code does not indicate whether the status is temporary or permanent. If the server does not want to provide this information to the client, it also responds to the 403 (Forbidden) status code.
1.5Server Error 5xx
The status code starting with '5' indicates that the server finds an error and cannot continue to execute the request. If the client has not completed the request when receiving the 5xx status code, it should immediately stop sending data to the server. In addition to responding to head requests, the server should include an explanation of the error situation in its response entity and specify that it is temporary and permanent.
This type of response code does not have a title field and can be applied to any request method.
500Internal Server Error)
The server failed to respond to the request due to an unexpected situation.
501Not implemented (not implemented)
The server cannot provide support for the functions required in the request. If the server cannot identify the request method, it will respond to this status code, which means it cannot respond to any resource requested by the request.
502Bad Gateway)
The server acting as the gateway or proxy receives an invalid response from the upstream (upstream) server that sends the request.
503Service unavailable)
The server cannot process the request currently. This is generally caused by temporary server overload or maintenance. This status code implies that the situation is temporary and requires some delay.
Note: The 503 Status Code does not imply that the server must return this status code when it is overloaded. Some servers may want to use simple processing during overload, that is, disconnect the connection.