As an Internet developer, the meaning of the HTTP status returned by some servers must be well known. Only by making clear these status codes one by one can various problems encountered in the work be handled with ease. So let’s take a look at some of the more common HTTP status codes.

The HTTP status code

1xx – Message prompt

These status codes represent temporary responses. Clients should be prepared to receive one or more 1XX responses before receiving regular responses.

  • 100 – ContinueThe initial request has been accepted and the client should continue to send the rest of the request. (New in HTTP 1.1)
  • 101 – Switching ProtocolsThe server will comply with the client’s request to another protocol (new in HTTP 1.1)

2 xx – success

This type of status code indicates that the server successfully accepted the client request.

  • 200 – OKEverything is fine, and the reply documents for the GET and POST requests follow.
  • 201 – CreatedThe server has created the document, and the Location header gives its URL.
  • 202 – AccepteD has accepted the request, but processing is not yet complete.
  • 203 – Non-Authoritative InformationThe document has returned normally, but some of the reply headers may be incorrect because a copy of the document is used, unauthoritative information (new in HTTP 1.1).
  • 204 – No ContentWithout a new document, the browser should continue to display the original document. This status code is useful if the user refreshes the page periodically and the Servlet can determine that the user document is sufficiently new.
  • 205 – Reset ContentThere is no new content, but the browser should reset what it shows. Used to force the browser to clear form input (new in HTTP 1.1).
  • 206 – Partial ContentThe customer sent a message withRangeThe head of theGETRequest (block request), the server completes it (new in HTTP 1.1).

3xx – Redirect

The client browser must do more to fulfill the request. For example, the browser might have to request a different page on the server, or repeat the request through a proxy server.

  • 300 – Multiple ChoicesThe document requested by the customer can be found in multiple locations that are already listed in the returned document. If the server wants to propose a preference, it should be indicated in the Location reply header.
  • 301 – Moved PermanentlyThe document the customer requested is elsewhere, the new URL is given in the Location header, and the browser should automatically access the new URL.
  • 302 – FoundSimilar to 301, but the new URL should be seen as a temporary replacement, not permanent. Note that in HTTP1.0 the corresponding status information isVersion Temporatily". When this status code appears, the browser automatically accesses the new URL, so it’s a useful status code. Note that this status code can sometimes be substituted with 301. For example, if the browser requests it incorrectlyhttp://host/~user(missing the trailing slash), some servers return 301, others 302. Strictly speaking, we can only assume that the browser automatically redirects only when the original request is a GET. For details, see 307.
  • 303 – See OtherSimilar to 301/302, except that if the original request was POST, the redirected target document specified by the Location header should be extracted via GET (new in HTTP 1.1).
  • 304 – Not ModifiedThe client has the buffered document and makes a conditional request (typically to provideIf-Modified-SinceThe header indicates that the customer only wants documents that are up to date). The server tells the client that the originally buffered document can still be used.
  • 305 – Use ProxyThe documents requested by the customer should passLocationHeader indicates proxy server extraction (new in HTTP 1.1).
  • 307 – Temporary RedirectSame as 302 (Found). Many browsers mistakenly redirect in response to a 302 reply, even though the original request was A POST, and even though it can actually redirect only if the reply to a POST request is 303. For this reason, HTTP 1.1 added 307 to make it easier to distinguish between several status codes: browsers can follow redirected GET and POST requests when a 303 reply occurs; If it is 307, the browser can only follow the redirection of the GET request. (New in HTTP 1.1)

4xx – Client error

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

  • 400 – Bad Request A syntax error occurs in the Request.
  • 401 – Unauthorized Access Was denied. A customer attempted to gain Unauthorized access to a password-protected page. The response contains a www-Authenticate header, which the browser uses to display the user name/password dialog box and re-issue the request after filling in the appropriate Authorization header. IIS defines a number of different 401 errors that specify more specific causes of the error. These specific errors · 401.1 – Login failure.
    1. 401.2 – Login failed due to server configuration.
    2. 401.3 – Not authorized due to ACL resource restrictions.
    3. 401.4 – Filter authorization failed.
    4. 401.5 – ISAPI/CGIApplication authorization failed. Procedure
    5. 401.7 – Access denied by URL authorization policy on Web server. This error code isIIS 6.0What is special.
  • 403 – ForbiddeN The resource is unavailable. The server understands the client’s request, but refuses to process it. This is usually caused by permission Settings on files or directories on the server. Access forbidden:IISThere are a lot of different definitions403Error, they refer to the more specific cause of error:
    1. 403.1 – Execution access is disabled.
    2. 403.2 – Read access disabled.
    3. 403.3 – Write access is disabled.
    4. 403.4 requirementsSSL.
    5. 403.5 requirementsSSL 128.
    6. 403.6 – IPThe address was rejected.
    7. 403.7 – Client certificate required.
    8. 403.8 – Site access denied.
    9. 403.9 – Too many users.
    10. 403.10 – Invalid configuration.
    11. 403.11 – Password change.
    12. 403.12 – Access to the mapping table is denied.
    13. 403.13 – The client certificate is revoked.
    14. 403.14 – Reject directory list.
    15. 403.15 – Exceeded client access permission.
    16. 403.16 – Client certificate not trusted or invalid.
    17. 403.17 – The client certificate has expired or has not taken effect.
    18. 403.18 – Requested cannot be executed in the current application poolURL. This error code isIIS 6.0What is special.
  • 403.19 – Cannot be executed for clients in this application poolCGI. This error code isIIS 6.0What is special.
  • 403.20 – PassportLogin failed. This error code isIIS 6.0What is special.
  • 404 – Not FoundThe resource at the specified location could not be found. This is also a common response.
  • 404.0 – (None) – No files or directories found.
  • 404.1 – The Web site cannot be accessed on the requested port.
  • 404.2 – WebService extension locking policy prevents this request.
  • 404.3 –MIMEThe mapping policy prevents this request.
  • 405 – Method Not AllowedRequest method (GET,POST,HEAD,DELETE,PUT,TRACE, etc.) does not apply to the specified resource and is used to access this pageHTTPPredicates not allowed (methods not allowed) (new in HTTP 1.1)
  • 406 – Not AcceptableThe specified resource has been found, but itsMIMEType and customer inAccpetIncompatible as specified in the header. The client browser does not accept the requested pageMIMEType (HTTP 1.1 new).
  • 407 – Proxy Authentication RequiredProxy authentication is required, similar to 401, which means that the client must first be authorized by the proxy server. (New in HTTP 1.1)
  • 408 – Request TimeoutThe client has not made any requests during the server license wait time. The customer can repeat the same request at a later date. (New in HTTP 1.1)
  • 409 – ConflictUsually associated with PUT requests. The request cannot succeed because it conflicts with the current state of the resource. (New in HTTP 1.1)
  • 410 – GoneThe requested document is no longer available, and the server does not know which address to redirect to. It differs from 404 in that returning 407 means the document has permanently left the specified location, whereas 404 means due to unknown

Cause The document is unavailable. (New in HTTP 1.1)

  • 411 – Length RequiredThe server cannot process the request unless the client sends a Content-Length header. (New in HTTP 1.1)
  • 412 – Precondition FailedSome preconditions specified in the request header fail (new in HTTP 1.1).
  • 413 –Request Entity Too LargeThe size of the target document is larger than the server is currently willing to process. If the server thinks it can process the request later, it should provide a retry-after header (new in HTTP 1.1).
  • 414 – Request URI Too Long URIToo long (new in HTTP 1.1).
  • 415 – Unsupported media types.
  • 416 –Requested Range Not SatisfiableThe server could not satisfy the Range header specified by the customer in the request. (NEW in HTTP 1.1) · 417 — Execution failed.
  • 423 — Locking error.

5xx – Server error

The server could not complete the request because it encountered an error.

  • 500 – Internal Server Error The Server encountered an unexpected condition and could not complete the customer’s request.
    1. 500.12 – The application is busy restarting on the Web server.
    2. 500.13 – Web server too busy.
    3. 500.15 – Direct requests to global.asa are not allowed.
    4. 500.16 — The UNC authorization credentials are incorrect. This error code is specific to IIS 6.0.
    5. 500.18 — URL authorization store cannot be opened. This error code is specific to IIS 6.0.
    6. 500.100 – Internal ASP error.
  • 501 – Not ImplementedThe server does not support the functionality required to implement the request, and the header value specifies the unimplemented configuration. For example, a customer makes a PUT request that is not supported by the server.
  • 502 – Bad GatewayWhen a server, acting as a gateway or proxy, accesses the next server to complete a request, but the server returns an invalid reply. Also said that the Web server used as a gateway or proxy server received an invalid response.
    1. 502.1 – CGIThe application timed out.
    2. 502.2 – CGIApplication error.
    3. 503 – Service UnavailableThe service is unavailable and the server is not responding due to maintenance or heavy load. For example, the Servlet might return 503 if the database connection pool is full. The server can provide a retry-after header when it returns 503. This error code is specific to IIS 6.0.
  • 504 – Gateway TimeoutGateway timeout, used by the server acting as a proxy or gateway, indicates that a reply cannot be received from the remote server in a timely manner. (New in HTTP 1.1). 505 –HTTP Version Not SupportedThe server does not support the HTTP version specified in the request. (New in HTTP 1.1)
Reference:
  1. Common HTTP status codes