Common HTTP request error codes

 

 

Response codes consist of three decimal digits that appear on the first line of the response sent by the HTTP server.

There are five types of response codes, indicated by their first digits:

1xx : information, request received, continue processing

2xx : Success, the behavior is successfully accepted, understood and adopted

3xx : Redirection, in order to complete the request, further actions must be performed

4xx : client error, the request contains a syntax error or the request cannot be fulfilled

5xx : Server error, the server cannot fulfill an apparently invalid request

Some common status codes are: (If you have any questions, please leave a message)

200  - The server successfully returned the page

404  - The requested page does not exist

503  - Service Unavailable

Detailed introduction:

2xx (Success) A status code indicating that the request was successfully processed.

code description

200 (Success)  The server has successfully processed the request. Usually, this means that the server served the requested web page.

201 (Created)  The request was successful and the server created a new resource.

202 (Accepted)  The server has accepted the request but has not yet processed it.

203 (Non-Authorization Information)  The server has successfully processed the request, but the information returned may have come from another source.

204 (No Content)  The server successfully processed the request, but did not return any content.

205 (Reset Content)  The server successfully processed the request, but did not return any content.

206 (Partial content)  The server successfully processed part of the GET request.

3xx (redirect) indicates that further action is required to complete the request. Typically, these status codes are used for redirection.

These status codes indicate that further action is required from the client to complete the request. Usually, these status codes are used for redirection, and the subsequent request address (redirection target) is specified in the Location field of this response.

code description

300 (Multiple choices)  The server can perform various operations in response to the request. The server can choose an operation according to the requester (user agent), or provide a list of operations for the requester to choose.

301 (Moved Permanently)  The requested webpage has permanently moved to a new location. When the server returns this response (in response to a GET or HEAD request), it automatically forwards the requester to the new location.

302 (Temporarily Moved)  The server is currently responding to requests from web pages in different locations, but the requester should continue to use the original location for future requests.

303 (See Other Locations)  This code is returned by the server when the requester should use separate GET requests for different locations to retrieve the response.

304 (Not Modified)  The requested page has not been modified since the last request. When the server returns this response, no webpage content is returned.

305 (Using Proxy)  The requester can only use a proxy to access the requested web page. If the server returns this response, it also indicates that the requester should use a proxy.

307 (temporary redirection)  The server is currently responding to requests from web pages in different locations, but the requester should continue to use the original location for future requests.

4xx (Bad Request) These status codes indicate that something might have gone wrong with the request, preventing the server from processing it.

These status codes indicate that the client appears to have encountered an error, preventing the server from processing. Unless the response is a HEAD request, the server SHOULD return an entity explaining the current error condition, and whether this is a temporary or permanent condition. These status codes apply to any request method. The browser SHOULD display to the user any entity content contained in such error responses.

code description

400 (Bad Request)  The server did not understand the syntax of the request.

401 (Unauthorized)  The request requires authentication. The server might return this response for web pages that require a login.

403 (Forbidden)  The server rejected the request.

404 (Not Found)  The server could not find the requested web page.

405 (Method Forbidden)  The method specified in the request is disabled.

406 (Not Accepted)  Unable to respond to the requested web page with the requested content attributes.

407 (Proxy Authorization Required)  This status code is similar to 401 (Unauthorized), but specifies that the requester should be authorized to use a proxy.

408 (Request Timeout)  The server timed out while waiting for the request.

409 (Conflict)  The server had a conflict while completing the request. The server MUST include information about the conflict in the response.

410 (Deleted)  This response is returned by the server if the requested resource has been permanently deleted.

411 (Valid Length Required)  The server did not accept the request without the Valid Content-Length header field.

412 (Precondition not met)  The server did not meet one of the preconditions set by the requester in the request.

413 (The request entity is too large)  The server cannot process the request because the request entity is too large and exceeds the processing capacity of the server.

414 (The requested URI is too long)  The requested URI (usually a URL) is too long for the server to handle.

415 (Unsupported Media Type)  The requested format is not supported by the requested page.

416 (Requested scope does not meet requirements)  This status code is returned by the server if the page cannot provide the requested scope.

417 (Expectation not met)  The server did not meet the "Expectation" request-header field.

5xx (Server Error) These status codes indicate that an internal error occurred while the server was trying to process the request.

These errors may be an error with the server itself, rather than an error with the request. This type of status code means that the server has an error or an abnormal state in the process of processing the request, or it may be that the server realizes that the processing of the request cannot be completed with the current hardware and software resources. Unless this is a HEAD request, the server SHOULD include an EXPLAIN INFO entity explaining the current error state and whether the condition is temporary or permanent. The browser SHOULD display to the user any entities contained in the current response.

code description

500 (Server Internal Error)  The server encountered an error and could not complete the request.

501 (Not yet implemented)  The server is not capable of fulfilling the request. For example, this code might be returned when the server does not recognize the request method.

502 (Bad Gateway)  The server, acting as a gateway or proxy, received an invalid response from an upstream server.

503 (Service Unavailable)  The server is currently unavailable (due to being overloaded or down for maintenance). Usually, this is only a temporary state.

504 (Gateway Timeout)  The server is acting as a gateway or proxy, but did not receive the request from the upstream server in time.

505 (HTTP Version Unsupported)  The server does not support the HTTP protocol version used in the request.

 

Guess you like

Origin blog.csdn.net/weixin_45740811/article/details/128972088