If a request is made to your server to display a webpage on your site (for example, when a user accesses your page through a browser or when Googlebot crawls the page), your server returns an HTTP status code in response to the request.
This status code provides information about the status of the request and provides Googlebot with information about your site and the pages that you requested.
Some of the common status codes are:
$ – Server successfully returned page 404 – The requested page does not exist 503 – The server is temporarily unavailable the following provides a complete list of HTTP status codes. Click on the link to learn more. You can also access the information about the HTTP status code in the pages for details.
1xx (temporary response)
A status code that represents a temporary response and requires the requestor to perform an action before continuing.
|
|
100 (Continue) |
The requestor shall continue to make the request. The return of this code by the server means that the server has received the first part of the request and is now waiting to receive the remainder. |
101 (Switching protocol) |
The requestor has asked the server to switch protocols, and the server has confirmed and is ready to switch. |
2xx (Success)
The status code used to indicate that the server has successfully processed the request.
|
|
200 (success) |
The server has successfully processed the request. Typically, this indicates that the server provided the requested Web page. If your robots.txt file is displayed for this status, this means that Googlebot has successfully retrieved the file. |
201 (created) |
The request was successful and the server has created a new resource. |
202 (accepted) |
The server has accepted the request, but it has not been processed. |
203 (non-authorised information) |
The server successfully processed the request, but returned information that might 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. Unlike the 204 response, this response requires the requestor to reset the document view (for example, to clear the form contents to enter new content). |
206 (partial content) |
The server successfully processed a partial GET request. |
3xx (redirected)
To complete the request, you need to proceed further. Typically, these status codes are always redirected. Google recommends that you use less than 5 redirects per request. You can use the Webmaster tools to see if Googlebot is having problems crawling your redirected pages.
DiagnosisThe Crawl errors page below lists URLs that Googlebot cannot crawl due to redirection errors.
|
|
300 (multiple options) |
The server can perform a variety of actions depending 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 (Permanent movement) |
The requested page has been permanently moved to a new location. When the server returns this response (as a response to a GET or HEAD request), the requestor is automatically forwarded to the new location. You should use this code to notify 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 requests from Web pages in different locations, but the requestor should continue to use the original location for future requests. This code, like the 301 code that responds to the GET and HEAD requests, automatically transfers the requestor to a different location. However, since Googlebot will continue to crawl the original location and index it, you should not use this code to notify Googlebot that a page or site has been moved. |
303 (See other locations) |
The server returns this code when the requester should make a separate GET request for a different location to retrieve the response. For all requests except the HEAD request, the server automatically goes to a different location. |
304 (not modified) |
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 (known as the If-modified-since HTTP header). Because the server can tell Googlebot that the webpage has not changed since the last crawl, it saves bandwidth and overhead. |
305 (use proxy) |
The requestor can only use the proxy to access the requested Web page. If the server returns this response, the server also indicates which proxy the requestor should use. |
307 (Temporary redirect) |
The server is currently responding to requests from Web pages in different locations, but the requestor should continue to use the original location for future requests. This code, like the 301 code that responds to the GET and HEAD requests, automatically transfers the requestor to a different location. However, since Googlebot will continue to crawl the original location and index it, you should not use this code to notify Googlebot that a page or site has been moved. |
4xx (Request error)
These status codes indicate that the request may have failed and that the server has been prevented from processing the request.
|
|
400 (Bad Request) |
The server does not understand the syntax of the request. |
401 (not authorized) |
Requests for authentication are requested. After logging in, the server may return this response to the page. |
403 (Forbidden) |
The server rejected the request. If this status code appears when Googlebot tries to crawl a valid webpage on your site (you can see this status code on the Web crawl page in the Google Webmaster Tools Diagnostics ), then this could be your server or host rejecting Googlebot access to it. |
404 (Not Found) |
The server could not find the requested Web page. For example, if the request is for a webpage that does not exist on the server, the server typically returns this code. If you do not have a robots.txt file on your site and you find this status on the robots.txt page of the Google Webmaster Tools Diagnostics tab, this is the correct state. However, if you have a robots.txt file and you find this status, this means that your robots.txt file may be named incorrectly or in the wrong location. (the file should be located on the top-level domain name and should be named Robots.txt). If you find this status on the URL Googlebot trying to crawl (on the HTTP error page of the Diagnostics tab), this means that Googlebot may be tracking an invalid link (old link or incorrect input link) on another page. |
405 (method Disabled) |
Disables the method specified in the request. |
406 (not accepted) |
The requested content attribute cannot be used in response to the requested Web page. |
407 (requires proxy authorization) |
This status code is similar to 401 (unauthorized), but specifies that the requestor should use the proxy for authorization. If the server returns this response, the server also indicates which proxy the requestor should use. |
408 (Request timed out) |
The server timed out while waiting for the request. |
409 (conflict) |
The server encountered a conflict while completing the request. The server must contain information about the conflicts that occurred in the response. The server may return this code in response to a PUT request that conflicts with the previous request, and will provide a list of differences for two requests. |
410 (Deleted) |
If the requested resource has been permanently deleted, the server returns this response. This code is similar to the 404 (not Found) code, but sometimes replaces the 404 code in cases where resources have previously existed but are no longer present. If the resource has been permanently deleted, you should use 301 code to specify a new location for the resource. |
411 (valid length required) |
The server does not accept requests that contain invalid content-Length header fields. |
412 (precondition not met) |
The server did not meet one of the prerequisites set by the requestor in the request. |
413 (Request entity too Large) |
The server was unable to process the request because the request entity was too large to exceed the server's processing power. |
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 (Request scope does not meet the requirements) |
If the request is made against an invalid range of pages, the server returns this status code. |
417 (expectations not met) |
The server does not meet the requirements for the expected 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 the error of the server itself, not the request.
|
|
500 (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, the server may return this code when the server does not recognize the request method. |
502 (Wrong Gateway) |
The server received an invalid response from the upstream server as a gateway or proxy. |
503 (service not available) |
The server cannot be used at this time (due to overloading or downtime maintenance). Usually, this is just a temporary state. |
504 (Gateway Timeout) |
The server acts as a gateway or proxy and does not receive requests from the upstream server in a timely manner. |
505 (HTTP version not supported) |
The HTTP protocol version used in the request is not supported by the server. |
Nginx 499 error caused by the thinking ~ ~
The Nginx log error message is as follows:
? [Copy to Clipboard] View Code LOG
58.212.81.150--[21/oct/2010:03:58:12-0500] "get/attachment/view/32807_120x120.jpg http/1.1" 499 0 "http:// www.theledlamps.com/"" mozilla/5.0 (Windows; U Windows NT 5.1; ZH-CN; rv:1.9.2.11) gecko/20101012 firefox/3.6.11 " |
In rfc2616, the error code between 400~500 is only defined to 417, so 499 should be Nginx's own definition. Later thought to read Nginx code, the question of the solution.
Enter the Nginx compile directory and type the following command
View Source code Printing Help
1 |
[[email protected] nginx-0.7.67]# grep 499. -R |
Get the following information:
? [Copy to Clipboard] View Code BASH
./changes:with 499 status Code. ./changes: *) Change:now the 499 error could not being redirected using an./src/http/ngx_http_special_response.c:ngx_null_ String,./src/http/ngx_http_request.h: #define NGX_HTTP_CLIENT_CLOSED_REQUEST 499./src/http/ngx_http_core_module.c : if (err->status = = Ngx_error | | err->status = = 499) {./changes.ru:??? Œ????? 499./changes.ru: *)????: Л?? 499? х? Gamma?? Х?ρ?—??? Я??? |
Based on the information found, see/src/http/ngx_http_special_response.c This file, which defines a number of HTTP error codes and the corresponding return. Note the following comment.
? [Copy to Clipboard] View Code C
Ngx_string (Ngx_http_error_495_page), Ngx_string (Ngx_http_error_496_page), Ngx_string (Ngx_http_error_497_page), Ngx_string (Ngx_http_error_404_page), Ngx_null_string, |
As you can see, 499 corresponds to "client has closed connection". This is most likely because the server-side processing time is too long, the client "impatient". To solve this problem, you need to do some optimizations on the program.
In addition to 499,nginx also defines 495/496/497/498 these status Codes, the corresponding meaning is also seen in the above comments. Open source stuff, can look at the source code at any time, this is very good.
Turn from
HTTP error code interpretation && nginx custom error _mandahang_ Sina Blog
Http://blog.sina.com.cn/s/blog_3f12afd00100u5oc.html
HTTP error code interpretation && nginx custom Error "Go"