HTTP1.1 status code and its description

xiaoxiao2021-03-06  63

HTTP 1.1 status code and its meaning

The table below shows the common HTTP 1.1 status code and their corresponding status information and meanings.

State code supported by HTTP 1.1 should be carefully used, because many browsers can only support HTTP 1.0. If you use the HTTP 1.1 unique status code, it is best to check the requesting HTTP version number.

Status Code Status Information Meaning 100 Continue The initial request has been accepted, and the customer should continue to send the rest of the request. (HTTP 1.1 new) 101 Switching Protocols server will follow the customer's request to another protocol (HTTP 1.1 new) 200 ok everything is normal, the answer document requesting the GET and POST requests back. The 201 CREATED server has created a document, and the Location header gives its URL. 202 ACCEPTED has been accepted, but the processing has not been completed. 203 Non-Authoritative Information The document has returned normally, but some responses may not be correct because the document is used (HTTP 1.1 new). 204 no content does not have a new document, the browser should continue to display the original document. If the user regularly refreshes the page, the servlet can determine that the user document is new enough, and this status code is useful. 205 Reset Content has no new content, but the browser should reset the content it displayed. Used to force the browser to clear the form input content (HTTP 1.1 new). 206 Partial Content The customer sent a GET request with the Range header, which completed it (HTTP 1.1 new). 300 MULTIPLE Choices Customer Requests Documents can be found at multiple locations, which have been listed within the returned document. If the server wants to make a priority, you should indicate at the Location response. 301 MOVED Permanently Customer Request Document In other places, the new URL is given in the location header, and the browser should automatically access the new URL. 302 FOUND is similar to 301, but the new URL should be considered a temporary alternative, not permanent. Note that the corresponding status information in HTTP1.0 is "Moved Temporatily". When this status code appears, the browser automatically accesses the new URL, so it is a very useful status code. Note that this status code is sometimes used for replacement with 301. For example, if the browser is incorrectly requests http: // Host / ~ User (missing behind the late slash), some servers return 301, and some returns 302. Strictly speaking, we can only assume that the browser will automatically redirect when the original request is Get. See 307. 303 SEE Other is similar to 301/302, and the difference is that if the original request is POST, the redirect target document specified by the local header should be extracted (HTTP 1.1 new). 304 NOT MODIFIED The client has buffered documents and issues a conditional request (generally providing the IF-Modified-Since header indicating that the customer only updates the document updated than the specified date). The server tells customers that the original buffer document can also be used. 305 USE Proxy Customer Request documents should be extracted by the proxy server indicated by the Location header (HTTP 1.1 new). 307 Temporary Redirect and 302 (Found) are the same. Many browsers are incorrectly responding to the 302 response to redirect, even if the original request is POST, even if it actually only responds to the POST request is 303, it can be redirected.

For this reason, HTTP 1.1 has increased by 307 to more clear the regional division of state code: When the 303 response occurs, the browser can follow the redirected GET and POST requests; if it is 307 response, the browser can only follow Redirection to the GET request. (HTTP 1.1 new) 400 Bad Request requests a syntax error. 401 Unauthorized Customers attempt to access the password-protected page without authorization. A WWW-Authenticate header will contain a www-authenticate header, the browser displays the user's name / password dialog, and then issues a request after filling the appropriate Authorization header. 403 Forbidden resource is not available. The server understands the customer's request, but refuses to handle it. It is usually caused due to the permissions settings of the file or directory on the server. 404 NOT FOUND Unable to find resources for the specified location. This is also a common response. 405 Method Not ALLOWED Request Method (GET, POST, HEAD, DELETE, PUT, TRAC, etc.) do not apply to the specified resource. (HTTP 1.1 new) 406 Not Acceptable Specifies the resource specified, but its MIME type and customer are not compatible (new HTTP 1.1) specified in the ACCPET header. 407 Proxy Authentication Required Similar to 401, the customer must first authorize the proxy server. (HTTP 1.1 new) 408 Request Timeout In the waiting time of the server license, customers have not issued any requests. Customers can repeat the same request later. (HTTP 1.1 new) 409 Conflict is usually related to the PUT request. Since the request and the current state of the resource conflict, the request cannot be successful. (HTTP 1.1 new) 410 Gone requested documentation is no longer available, and the server does not know which address should be redirected. The difference between it and 404 is that the return 407 indicates that the document is permanently left the specified location, and 404 indicates that the document is not available for unknown reason. (HTTP 1.1 new) 411 Length Required server cannot handle the request unless the customer sends a Content-Length header. (HTTP 1.1 new) 412 Precondition Failed requests some prerequisites fails (HTTP 1.1 new). 413 Request Entity Too Large The size of the target document exceeds the size of the server is currently willing to handle. If the server considers yourself to process the request later, you should provide a Retry -After header (HTTP 1.1 new). 414 Request Uri Too Long Uri is too long (HTTP 1.1 new). 416 Requested Range Not Satisfiable server does not satisfy the Range header specified in the request. (HTTP 1.1 new) 500 INTERNAL Server Error server encountered unexpected situations and cannot complete customer requests. The 501 Not Implemented server does not support the functions required to implement the request. For example, the customer issued a PUT request that the server is not supported. 502 BAD GATEWAY Server As a gateway or agent, in order to complete the request to access the next server, the server returns an illegal response. 503 Service UNAVAILALALABLE server has failed to respond due to maintenance or load. For example, servlet may return 503 in the case where the database connection pool is full.

转载请注明原文地址:https://www.9cbs.com/read-111555.html

New Post(0)