When requesting remote files in Ajax or checking whether the remote files are out of chain, you need to know the Status feedback from the remote server to determine whether the files exist or not.
Of course, when we browse webpages, we will also find that some files do not exist and are displayed as "404 error", which is the common HTTP Request status (Status)
The Web server responds to browsers or other customers Program The response is generally composed of the following parts: one status line, several response headers, one blank line, and the content document. The following is a simple response:
The status line contains the HTTP Version and status Code And brief description corresponding to the status code. In most cases, all Response Headers except Content-Type are optional. However, content-type is required. It describes the MIME type of the subsequent documents. Although most responses contain a document, some do not. For example, responses to head requests will never come with the document. Many status codes are actually used to identify a failed request, and these responses do not contain documents (or only contain a brief Error Message description ).
When a user attempts to access content on a server that is running Internet Information Service (IIS) through HTTP, IIS returns a digital code indicating the status of the request. The status code can indicate whether the request is successful or not, and reveal the exact cause of the Request failure.
1xx-Information prompt
These status codes indicate temporary responses. Before receiving a regular response, the client should be prepared to receive one or more 1xx responses.
· The initial 100-continue request has been accepted, and the customer should continue to send the rest of the request. (New HTTP 1.1)
· 101-switching protocols server converts client-compliant requests to another protocol (New in HTTP 1.1)
2XX-success
This type of Status Code indicates that the server successfully accepts client requests.
· 200-OK: Everything works normally. The response documents for get and post requests follow.
· The 201-created server has created a document and the location header provides its URL.
· 202-accepted has accepted the request, but the processing has not been completed yet.
· The 203-non-authoritative information document has been normally returned, but some response headers may be incorrect because the document is copied and the non-authoritative information is used (New in HTTP 1.1 ).
· No new document exists in 204-NO content. The browser should continue to display the original document. This status code is useful if the user regularly refreshes the page and the servlet can determine that the user document is new enough.
· 205-Reset content has no new content, but the browser should reset the content displayed by it. Used to force the browser to clear the input content of the form (New in HTTP 1.1 ).
· 206-partial content the client sends a GET request with a range header, and the server completes the request (New in HTTP 1.1 ).
3xx-redirection
The client browser must perform more operations to implement the request. For example, the browser may have to request different pages on the server, or use <a id = "vad_2" onmouseover = "If (typeof (showtitle )! = 'Undefined') {This. title = ''; window. cleartimeout (hideto); showtitle (event, this, 2, '');}" Title = "no online game strategy? @ Vogate.com "style =" font-size: 1em "onclick =" "onmouseout =" If (typeof (showtitle )! = 'Undefined') {mouseisoverlayer = false; mouseoverwhileload = false; hideto = Window. setTimeout ('checkifmouseoverlayer () ', 500);} "href =" http://action.vogate.com/click/click.php? Ads_id = 3503 & site_id = 6235007045040803 & click = 1 & url = http % 3A // www.766.com % 7C % u73a9 % u6e38 % u620f % u641e % u5b9a % u653b % u7565 % u600e % region % 3 bhttp % 3A // region % 7C % u8dd1 % u8dd1 % u5361 % u4e01 % u8f66 % u624b % u628a % u624b % u6559 % region % u79fb % signature % u62db % uff01 % 3 bhttp % 3A // signature % 7C % u4f60 % u7edd % u5bf9 % u6ca1 % u770b % u8fc7 % u8fd9 % signature % u6570 % Signature % u5e93 % uff01 % 3 bhttp % 3A // tu.766.com % 7C % u 4e3a % signature % u5929 % u90fd % u6709 % u8fd9 % u4e48 % u591a % u7537 % signature % u6765 % signature % u91cc % uff1f % 3 bhttp % 3A/// signature % 7c % u73a9 % u5f69 % u8679 % second % u6765 % second % u91cc % second % u3002 % u8981 % second % u4e48 % u6709 % u4ec0 % second % uff01 & V = 0 & K = % u4ee3 % u7406 & s = http % 3A // www.023si.com/html/79/t-13279.html&rn=942481 "target =" _ blank "> the proxy server repeats the request.
· 300-multiple choices the document requested by the customer can be found in multiple locations, which are listed in the returned documents. If the server needs to give priority, it should be specified in the location response header.
· 301-moved permanently the document requested by the customer is elsewhere. The new URL is provided 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 treated as a temporary alternative, rather than permanent. Note that the corresponding status information in http1.0 is "Moved temporatily ". When this status code appears, the browser can automatically access the new URL, so it is a very useful status code. Note that this status code can be replaced with 301 sometimes. For example, if the browser mistakenly requests http: // host /~ If the user (with a slash missing), some servers return 301, and some return 302. Strictly speaking, we can only assume that the browser will automatically redirect only when the original request is get. See 307.
· 303-see other is similar to 301/302. The difference is that if the original request is post, the redirection target document specified by the location header should be extracted through get (New in HTTP 1.1 ).
· The 304-not modified client has a buffered document and sends a conditional request (generally, the IF-modified-since header is provided to indicate that the customer only wants to update the document on a specified date ). The server tells the customer that the original buffer documentation can still be used.
· 305-use the proxy client request document should be extracted by the proxy server specified in the location header (New in HTTP 1.1 ).
· 307-temporary redirect and 302 (found) are the same. Many browsers mistakenly respond to the 302 response for redirection. Even if the original request is post, it can only be redirected when the POST request actually responds to 303. For this reason, HTTP 1.1 adds 307 to clear the region code in several states: When a 303 response occurs, the browser can follow the redirected get and post requests; if a 307 response occurs, the browser can only follow the redirection to get requests. (New HTTP 1.1)
4xx-client Error
The client seems to be faulty when an error occurs. For example, the client does not provide valid authentication information for a page that does not exist in a request.
· A syntax error occurs in the 400-bad request.
· 401-unauthorized access is denied. The customer tries to access the password-protected page without authorization. The response contains a WWW-Authenticate header. the browser displays the username/password dialog box accordingly, and then sends a request again after entering the appropriate authorization header. IIS defines many different 401 errors, which indicate more specific error causes. These specific error codes are displayed in the browser but not in the IIS log:
· 401.1-Logon Failed.
· 401.2-login failed due to server configuration.
· 401.3-the ACL is not authorized due to resource restrictions.
· 401.4-filter authorization failed.
· 401.5-An error occurred while authorizing the ISAPI/cgi application.
· 401.7-the access is rejected by the URL Authorization Policy on the Web server. This error code is dedicated to IIS 6.0.
· 403-Forbidden resources are unavailable. The server understands the customer's request, but rejects the request. This is usually caused by permission settings for files or directories on the server. Forbidden access: IIS defines many different 403 errors, which indicate more specific error causes:
· 403.1-the execution access is forbidden.
· 403.2-Read access is forbidden.
· 403.3-write access is forbidden.
· 403.4-require SSL.
· 403.5-requires SSL 128.
· 403.6-the IP address is rejected.
· 403.7-client certificate required.
· 403.8-site access is denied.
· 403.9-too many users.
· 403.10-the configuration is invalid.
· 403.11-password change.
· 403.12-access to the ing table is denied.
· 403.13-the client certificate is revoked.
· 403.14-reject the directory list.
· 403.15-exceeds the client access permission.
· 403.16-the client certificate is untrusted or invalid.
· 403.17-the client certificate has expired or has not yet taken effect.
· 403.18-the requested URL cannot be executed in the current application pool. This error code is dedicated to IIS 6.0.
· 403.19-CGI cannot be executed for clients in this application pool. This error code is dedicated to IIS 6.0.
· 403.20-logon to passport failed. This error code is dedicated to IIS 6.0.
· 404-not found cannot find the resource at the specified position. This is also a common response.
· 404.0-(none)-No file or directory found.
· 404.1-unable to access the web site on the requested port.
· 404.2-the Web service extended locking policy blocks this request.
· 404.3-the mime ing policy blocks this request.
· 405-method not allowed request methods (get, post, Head, delete, put, Trace, etc.) are not applicable to specified resources, HTTP predicates used to access this page are not allowed (methods are not allowed) (new in HTTP 1.1)
· The resource specified by 406-not acceptable has been found, but its MIME type is incompatible with the one specified by the customer in the accpet header, the client browser does not accept the MIME type of the requested page (New in HTTP 1.1 ).
· 407-proxy authentication required requires proxy authentication, similar to 401, indicating that the customer must first be authorized by the proxy server. (New HTTP 1.1)
· 408-request timeout the client has not sent any request within the waiting time permitted by the server. The customer can repeat the same request later. (New HTTP 1.1)
· 409-conflict is usually related to put requests. The request cannot be successful because the request conflicts with the current status of the resource. (New HTTP 1.1)
· The document requested by 410-gone is no longer available, and the server does not know which address to redirect. It differs from 404 in that if 407 is returned, the document permanently leaves the specified position, and 404 indicates that the document is unavailable for unknown reasons. (New HTTP 1.1)
· The 411-length required server cannot process the request unless the client sends a Content-Length header. (New HTTP 1.1)
· 412-precondition some of the prerequisites specified in the failed Request Header fail (New in HTTP 1.1 ).
· The size of the 413-Request Entity too large target document exceeds the size that the server is 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 URI is too long (HTTP 1.1 is new ).
· 415-unsupported media type.
· 416-requested range not satisfiable the server cannot meet the range header specified by the customer in the request. (New HTTP 1.1)
· 417-execution failed.
· 423-locking error.
5xx-Server Error
The server cannot complete the request because of an error.
· 500-the internal server error server encounters unexpected circumstances and cannot complete the customer's request.
· 500.12-the application is busy restarting on the Web server.
· 500.13-the Web server is too busy.
· 500.15-Direct Request to global. ASA is not allowed.
· The 500.16-unc authorization credential is incorrect. This error code is dedicated to IIS 6.0.
· 500.18-the URL-authorized storage cannot be opened. This error code is dedicated to IIS 6.0.
· 500.100-Internal ASP error.
· The 501-not implemented server does not support the functions required to implement the request. The header value specifies the unimplemented configuration. For example, the customer sends a put request not supported by the server.
· When the 502-Bad Gateway server acts as a gateway or proxy, the server returns an invalid response to access the next server to complete the request. In other words, the web server receives an invalid response when it is used as a gateway or proxy server.
· 502.1-CGI application timeout.
· 502.2-CGI application error.
· 503-service unavailable service is unavailable, and the server fails to respond due to maintenance or overload. For example, Servlet may return 503 when the database connection pool is full. When the server returns 503, A retry-after header can be provided. This error code is dedicated to IIS 6.0.
· 504-gateway timeout gateway times out and is used by the server acting as a proxy or gateway, indicating that the remote server cannot receive a response in a timely manner. (New in HTTP 1.1 ).
· Server 505-HTTP Version Not Supported does not support the HTTP Version specified in the request. (New in HTTP 1.1 ).