One. HTTP common return status codes are:
a 1xx (ad hoc response) represents a temporary response and requires a status code for the requestor to continue to perform the operation. -(continued) The requestor shall continue to make the request. The server returns this code to indicate that the first part of the request was received and is waiting for the remainder. 101(switching protocol) The requestor has asked the server to switch protocols, and the server has confirmed and is ready to switch.
$http _code["0"]="Unable to access"; $http _code[" -"]="Continue"; $http _code["101"]="Switching Protocols";
2xx (Success) indicates that the requested status code was successfully processed. $(successful) The request was successfully processed by the server. Typically, this indicates that the server provided the requested Web page. If this status code is displayed for your robots.txt file, it means that Googlebot has successfully retrieved the file. 201(created) the request succeeded and the server created a new resource. 202the server has accepted the request, but it has not yet been processed. 203(non-authoritative information) the server has successfully processed the request, but the information returned may be 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. And204response, this response requires the requestor to reset the document view (for example, to clear the form contents to enter new content). 206a partial GET request was successfully processed by the server (part of the content). $http _code[" $"]="OK"; $http _code["201"]="Created"; $http _code["202"]="Accepted"; $http _code["203"]= "non-authoritative information "; $http _code["204"]="No Content"; $http _code["205"]="Reset Content"; $http _code["206"]= "Partial Content";
3xx (redirected) to complete the request, further action is required. Typically, these status codes are used for redirection. Google recommends that you use redirects in each request not to exceed5times. You can use the Webmaster tools to see if Googlebot is having trouble crawling the redirected pages. The network crawl page under diagnosis lists URLs that Googlebot cannot crawl due to redirection errors. -(multiple choices) the server can perform a variety of operations on the request. The server can select an action based on the requestor (user agent) or provide a list of actions for the requestor to select. 301(permanently moved) The requested page has been permanently moved to a new location. When the server returns this response (a response to a GET or HEAD request), the requestor is automatically forwarded to the new location. You should use this code to tell Googlebot that a Web page or Web site has been permanently moved to a new location. 302(Temporary move) The server is currently responding to a request from a Web page in a different location, but the requestor should continue to use the original location to respond to subsequent requests. This code responds to the request of the GET and HEAD301Similarly, the code will automatically move the requestor to a different location, but you should not use this code to tell Googlebot that a Web page or site has moved because Googlebot will continue to crawl the original location and index it. 303(see other locations) The server returns this code when the requester should use a separate GET request for the different locations to retrieve the response. For all requests except HEAD, the server automatically goes to a different location. 304(unmodified) The requested webpage has not been modified since the last request. When the server returns this response, the Web page content is not returned. If the page has not changed since the requestor last requested it, you should configure the server to return this response (called If-modified-Since HTTP header). The server can tell Googlebot that the webpage has not changed since the last crawl, thus saving bandwidth and overhead. 305the requestor (using a proxy) can only use the proxy to access the requested Web page. If the server returns this response, it also indicates that the requestor should use the proxy. 307(temporary redirection) The server is currently responding to requests from a Web page in a different location, but the requestor should continue to use the original location to respond to subsequent requests. This code responds to the request of the GET and HEAD301Similarly, the code will automatically move the requestor to a different location, but you should not use this code to tell Googlebot that a page or site has moved because Googlebot will continue to crawl the original location and index it. $http _code[" -"]="Multiple Choices"; $http _code["301"]="Moved permanently"; $http _code["302"]="Found"; $http _code["303"]="See other"; $http _code["304"]="Not Modified"; $http _code["305"]="Use Proxy"; $http _code["306"]="(Unused)"; $http _code["307"]= "Temporary Redirect";
4xx (Request error) These status codes indicate a possible error in the request and hinder the processing of the server. -(Error request) The server does not understand the syntax of the request. 401(Unauthorized) Request authentication is required. The server may return this response for Web pages that are requested after logging in. 403(Forbidden) The server rejects the request. If you see this status code when Googlebot tries to crawl a valid webpage on your site (you can see this information on the Web crawl page under Google Webmaster Tools Diagnostics), your server or host may have denied Googlebot access. 404(not found) The requested Web page was not found by the server. For example, this code is often returned for Web pages that do not exist on the server. If your site does not have a robots.txt file, and you are on the Google webmaster Tools"Diagnosis"you see this status code on the robots.txt page of the label, this is the correct status code. However, if you have a robots.txt file and you see this status code, your robots.txt file may be named incorrectly or in the wrong location (the file should be in the top-level domain named robots.txt). If you see this status code for Googlebot crawled URLs (in"Diagnosis"label on the HTTP error page), it means that Googlebot follows a potentially invalid link to another page (an old link or an incorrectly entered link). 405(method Disabled) Disables the method specified in the request. 406(not accepted) cannot use the requested content attribute to respond to the requested Web page. 407(Requires proxy authorization) this status code and401(not authorized), but specifies that the requestor should authorize the use of the proxy. If the server returns this response, it also indicates that the requestor should use the proxy. 408A timeout occurred while the server was waiting for a request (Request timed out). 409(conflict) The server has a conflict when it finishes the request. The server must include information about the conflict in the response. This code may be returned by the server in response to a PUT request that conflicts with the previous request, as well as a list of differences of two requests. 410(deleted) If the requested resource has been permanently deleted, the server returns this response. The Code and404Code (not found) is similar, but is sometimes used to replace a resource if it existed before and now does not exist.404Code. If the resource has been permanently moved, you should use the301Specifies the new location of the resource. 411(requires valid length) The server does not accept requests that do not contain a valid Content-Length header field. 412(Prerequisites not met) the server did not meet one of the prerequisites set by the requestor in the request. 413(Request entity is too large) the server cannot process the request because the request entity is too large to exceed the processing power of the server. 414(The requested URI is too long) The requested URI (usually the URL) is too long for the server to process. 415(Unsupported media type) The requested format is not supported by the requested page. 416(the request scope does not meet the requirements) if the page cannot provide the requested scope, the server returns this status code. 417(unmet expectations) server not satisfied"expected"Request header field requirements. $http _code[" -"]="Bad Request"; $http _code["401"]="Unauthorized"; $http _code["402"]="Payment Required"; $http _code["403"]="Forbidden"; $http _code["404"]="Not Found"; $http _code["405"]="Method not allowed"; $http _code["406"]="not acceptable"; $http _code["407"]="Proxy authentication Required"; $http _code["408"]="Request Timeout"; $http _code["409"]="Conflict"; $http _code["410"]="Gone"; $http _code["411"]="Length Required"; $http _code["412"]="Precondition Failed"; $http _code["413"]="Request Entity Too Large"; $http _code["414"]= "request-URI Too Long "; $http _code["415"]="Unsupported Media Type"; $http _code["416"]="requested Range not satisfiable"; $http _code["417"]="Expectation Failed";
5xx (server error) These status codes indicate that the server has an internal error while processing the request. These errors may be the error of the server itself, not the request. -(Server internal error) the server encountered an error and could not complete the request. 501(not yet implemented) the server does not have the capability to complete the request. For example, this code may be returned when the server does not recognize the request method. 502(Error Gateway) The server receives an invalid response from the upstream server as a gateway or proxy. 503(Service Unavailable) the server is not currently available (due to overloading or downtime maintenance). Typically, this is only a temporary state. 504(Gateway Timeout) The server acts as a gateway or proxy, but does not receive requests from the upstream server in a timely manner. 505the HTTP protocol version used in the request is not supported by the server (HTTP version is not supported). $http _code[" -"]="Internal Server Error"; $http _code["501"]="not implemented"; $http _code["502"]="Bad Gateway"; $http _code["503"]="Service unavailable"; $http _code["504"]="Gateway Timeout"; $http _code["505"]= "HTTP Version not supported";
Two, curl strange return value 000.
It has been tested to show that 000 of the cases occur when curl occurs in the following ways:
1.Failed DNS Resolution (6)
$ curl-w "%{http_code}\n" Http://example.invalid/; echo "Exit code: $?" Curl: (6) Could not resolve Host:example.invalid Exit code:6
2.Connection refused (7)
$ curl-w "%{http_code}\n" http://localhost:81/; echo "Exit code: $?" Curl: (7) Failed to connect to localhost port 81:connection refused Exit code:7
3.Connection timed out (28)
$ curl-w "%{http_code}\n"-M 5 http://10.255.255.1/; echo "Exit code: $?" Curl: (Connection) timed out after 5001 milliseconds Exit code:28
* Note: Generally encountered 000, the default consideration is 200, normal.
The case of the HTTP return code in Chinese and English and return code 000