Xmlhttp status and its meaning

Source: Internet
Author: User

Reprinted:

When AJAX requests remote files or detects whether the remote files are out of the chain, you need to know the Status feedback from the remote server to determine whether the file exists and

No.
Of course, when we browse webpages, we will also find that some files do not exist and are displayed as "404 error", which is a common Http Request status.

(Status)
When a Web server responds to a request from a browser or another client program, its response consists of the following parts: a status line, several response headers, and an empty

Line, content document. The following is a simple response:

The status line contains the HTTP Version, status code, and brief descriptions corresponding to the status code. In most cases, except for Content-Type

The response header is optional. However, Content-Type is required. It describes the MIME Type of the subsequent documents. Although most responses contain a document

Some do not include, for example, the response to the HEAD request will never be included in the document. Many status codes are used to identify a failed request.

Does not contain documents (or only contains 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 request

Status code. 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.

, Non-authoritative information (New in HTTP 1.1 ).
· No new document exists in 204-No Content. The browser should continue to display the original document. If the user regularly refreshes the page, the Servlet can determine to use

The user documentation is new enough, and this status code is very useful.
· 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 form input content (HTTP

1.1 New ).
· 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 strategy for online games? @ 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 % u4E0D %

U5B9A % u653B % u7565 % u600E % u4E48 % u529E % uFF1F % 3 Bhttp % 3A // signature % 7C % signature % u8DD1 % u5361 % u4E01 % u8F66 % signature %

U628A % u624B % u6559 % u4F60 % u6F02 % u79FB % u7EDD % u62DB % uFF01 % 3 Bhttp % 3A // signature % 7C % u4F60 % signature % u5BF9 % u6CA1 %

Signature % u8FC7 % u8FD9 % u4E48 % u5F3A % signature % u6570 % u636E % u5E93 % uFF01 % 3 Bhttp % 3A // signature % 7C % u4E3A % u4EC0 % u4E48 %

% U5929 % u90FD % u6709 % u8FD9 % u4E48 % u591A % u7537 % u4EBA % u6765 % u8FD9 % u91CC % uFF1F % 3 Bhttp % 3A // %7c %

U73A9 % u5F69 % u8679 % u5C9B % u6765 % signature % u91CC % signature % u3002 % u8981 % signature % u4E48 % u6709 % signature % u4E48 % 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

If priority is set, 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: The status information corresponding to HTTP1.0

The parameter 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:

This status code can be replaced with 301 sometimes. For example, if the browser mistakenly requests http: // host /~ User (the slashes are missing ),

The server returns 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

GET (New in HTTP 1.1 ).
· 304-Not Modified the client has buffered documents and issued a conditional request (generally, the If-Modified-Since header is provided to indicate that only

To update a 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, even if it is actually redirected only when the response of the POST request is 303. For this reason, HTTP 1.1 adds 307 to clear regions more

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 GET

Request redirection. (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 will contain a WWW-Authenticate

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 causes of errors. 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. Generally, because of the file or directory permission settings on the server

To. 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 and are used to access

HTTP predicates on this page are not allowed (methods are not allowed) (new to 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

The MIME type of the requested page is not accepted (HTTP 1.1 is new ).
· 407-Proxy Authentication Required requires Proxy Authentication, similar to 401, indicating that the customer must first pass the authorization from the Proxy Server

Permission. (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

407 indicates that 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 be later

Then process the request, a Retry-After header should be provided (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

PUT requests 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, a Servlet may be connected to a database.

If the connection pool is full, 503 is returned. 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 ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.