http status code list_basic tutorial

WBOY
Release: 2016-05-16 12:09:00
Original
2267 people have browsed it

We often encounter 404, 500, 302 and other prompts. What do they mean? In addition to these common status codes, are there any other status codes that we have not encountered but may appear? Here I have made a summary and share it with you.

HTTP Status Code Summary Description
--------------------------------------------- -------------------------------------------------- ------------------

Success 2XX Status code for successfully processing the request.
200 The server has successfully processed the request and served the requested web page.
204 The server successfully processed the request but did not return anything.
Reinstance to 3XX Each request for each request for more than 5 times.
301 The requested web page has been permanently moved to a new location. When URLs change, use the 301 code. Save the new URL in the search engine index.
302 The requested web page is temporarily moved to a new location. The original URL is saved in the search engine index.
304                                                                                                                                                                       used to tell the search engine bots if the webpage not been updated since the requester's last request, save bandwidth and overhead.
Client error 4XX indicates that the request may be in error, preventing the server from processing it.
400 The server does not understand the syntax of the request.
403 The server refused the request.
404 The server cannot find the requested web page. This code is often returned for web pages that do not exist on the server.
410 The server returns this response after the requested resource is permanently deleted. This code is similar to the 404 (not found) code,
but is sometimes used instead of the 404 code when the resource previously existed but now does not. If a resource has been permanently deleted, 301 should be used to specify the resource's new location.
Server error 5XX means that an internal error occurred while the server was processing the request. These errors may be errors on the server itself rather than an error in the request.
500 The server encountered an error and was unable to complete the request.
503 The server is currently unavailable (due to overload or downtime for maintenance). Usually, this is a temporary state.

Detailed breakdown:

2XX Success

200 OK; request completed.
201 Normal; immediately followed by POST command.
202 OK; accepted for processing, but processing has not yet completed.
203 Normal; partial information - only part of the information returned.
204 Normal; No response - The request was received, but there is no information to be sent back.

3XX Redirect

301 Moved — The requested data has a new location and the changes are permanent.
302 Found — The requested data temporarily has a different URI.
303 See Other — The response to the request can be found under another URI and should be retrieved using the GET method.
304 Unmodified — The document was not modified as expected.
305 Use proxy — The requested resource must be accessed through the proxy provided in the location field.
306 Unused — No longer used; retain this code for future use.

4XX Errors in the client

400 Bad Request — There is a syntax problem in the request, or the request cannot be fulfilled.
401 Unauthorized — The client is not authorized to access the data.
402 Payment Required — Indicates that the billing system is in effect.
403 Forbidden — No access required even if authorized.
404 Not Found — The server cannot find the given resource; the document does not exist.
407 Proxy Authentication Request - The client must first authenticate itself using a proxy.
415 Unsupported media type — The server refused to service the request because the format of the requested entity is not supported.

5XX Error in the server

500 Internal Error — The server was unable to complete the request due to unexpected circumstances.
501 Not executed — The server does not support the requested tool.
502 Bad Gateway - The server received an invalid response from the upstream server.
503 Unable to obtain service — The server was unable to process the request due to temporary overload or maintenance.

504 Gateway Timeout
When a server working as a gateway or proxy tries to execute a request, it fails to receive it in time from the upstream server (the server identified by the URI, such as HTTP, FTP, LDAP) or the auxiliary server (such as DNS) response.
Note: Some proxy servers will return 400 or 500 errors when DNS query times out

505 HTTP Version Not Supported
The server does not support, or refuses to support, the HTTP version used in the request. This implies that the server is unable or unwilling to use the same version as the client. The response should contain an entity describing why the version is not supported and what protocols the server supports.

506 Variant Also Negotiates
Extended by the "Transparent Content Negotiation Protocol" (RFC 2295), indicating that the server has an internal configuration error: the requested negotiation variable resource is configured to use itself in transparent content negotiation, so in A negotiated process is not an appropriate focus.

507 Insufficient Storage
The server cannot store the content necessary to complete the request. This condition is considered temporary. WebDAV (RFC 4918)

508 Loop Detected
The server found an infinite loop in the request

509 Bandwidth Limit Exceeded
The server reached the bandwidth limit. This is not an official status code, but is still widely used.

510 Not Extended
The strategies required to obtain resources are not met. (RFC 2774)

How to deal with common errors

500 Error

500 error is a problem that webmasters often encounter. Based on my experience, the reasons and solutions are summarized as follows:

1. There are too many running users, which puts too much pressure on the server. If the server cannot respond, an HTTP500 error will be reported.

This reason is the main reason why websites report 500 errors. Why do many websites suddenly report 500 errors (service unavailable)? 90% are caused by excessive space pressure, exceeding the upper limit set by the space provider.

When encountering this problem, it is best to contact the after-sales service of the space provider as soon as possible. They will usually help you recycle the application pool and the problem will be solved. If you cannot find after-sales service, you can find the "Recycle Application Pool" item in the space management background and execute it manually. However, some space management backends do not provide this service.

2. If the first possibility is ruled out, then the main reason is that there is a problem with the program.

You can make a simple test page to see if it can run successfully, and then detect the error page to make targeted modifications.

If the association is not made where the association should be made, an HTTP500 error will be reported. Perform manual or automatic correlation and the problem is solved.

3. If the operation performed in the test requires inserting data into the database, it is possible that if the large amount of data causes the table space in the database to be full, or the buffer pool is too small to satisfy the data access, etc. Resulting in HTTP500 error.

The solution is to adjust the database, modify the connection pool size, etc., and make corrections according to individual circumstances.


HTTP Status Code Summary Description
------------------------------------------------ -------------------------------------------------- --------------------------

Success 2XX Status code for successfully processing the request.
200 The server has successfully processed the request and served the requested web page.
204 The server successfully processed the request but did not return anything.
Reinstance to 3XX Each request for each request for more than 5 times.
301 The requested web page has been permanently moved to a new location. When URLs change, use the 301 code. Save the new URL in the search engine index.
302 The requested web page is temporarily moved to a new location. The original URL is saved in the search engine index.
304                                                                                                                                                                       used to tell the search engine bots if the webpage not been updated since the requester's last request, save bandwidth and overhead.
Client error 4XX indicates that the request may be in error, preventing the server from processing it.
400 The server does not understand the syntax of the request.
403 The server refused the request.
404 The server cannot find the requested web page. This code is often returned for web pages that do not exist on the server.
410 The server returns this response after the requested resource is permanently deleted. This code is similar to the 404 (not found) code,
but is sometimes used instead of the 404 code when the resource previously existed but now does not. If a resource has been permanently deleted, 301 should be used to specify the resource's new location.
Server error 5XX means that an internal error occurred while the server was processing the request. These errors may be errors on the server itself rather than an error in the request.
500 The server encountered an error and was unable to complete the request.
503 The server is currently unavailable (due to overload or downtime for maintenance). Usually, this is a temporary state.

Detailed breakdown:

2XX Success

200 OK; request completed.
201 Normal; immediately followed by POST command.
202 OK; accepted for processing, but processing has not yet completed.
203 Normal; partial information - only part of the information returned.
204 Normal; No response - The request was received, but there is no information to be sent back.

3XX Redirect

301 Moved — The requested data has a new location and the changes are permanent.
302 Found — The requested data temporarily has a different URI.
303 See Other — The response to the request can be found under another URI and should be retrieved using the GET method.
304 Unmodified — The document was not modified as expected.
305 Use proxy — The requested resource must be accessed through the proxy provided in the location field.
306 Unused — No longer used; retain this code for future use.

4XX Errors in the client

400 Bad Request — There is a syntax problem in the request, or the request cannot be fulfilled.
401 Unauthorized — The client is not authorized to access the data.
402 Payment Required — Indicates that the billing system is in effect.
403 Forbidden — No access required even if authorized.
404 Not Found — The server cannot find the given resource; the document does not exist.
407 Proxy Authentication Request - The client must first authenticate itself using a proxy.
415 Unsupported media type — The server refused to service the request because the format of the requested entity is not supported.

5XX Error in the server

500 Internal Error — The server was unable to complete the request due to unexpected circumstances.
501 Not executed — The server does not support the requested tool.
502 Bad Gateway - The server received an invalid response from the upstream server.
503 Unable to obtain service — The server was unable to process the request due to temporary overload or maintenance.

504 Gateway Timeout
When a server working as a gateway or proxy tries to execute a request, it fails to receive it in time from the upstream server (the server identified by the URI, such as HTTP, FTP, LDAP) or the auxiliary server (such as DNS) response.
Note: Some proxy servers will return 400 or 500 errors when DNS query times out

505 HTTP Version Not Supported
The server does not support, or refuses to support, the HTTP version used in the request. This implies that the server is unable or unwilling to use the same version as the client. The response should contain an entity describing why the version is not supported and what protocols the server supports.

506 Variant Also Negotiates
Extended by the "Transparent Content Negotiation Protocol" (RFC 2295), indicating that the server has an internal configuration error: the requested negotiation variable resource is configured to use itself in transparent content negotiation, so in A negotiated process is not an appropriate focus.

507 Insufficient Storage
The server cannot store the content necessary to complete the request. This condition is considered temporary. WebDAV (RFC 4918)

508 Loop Detected
The server found an infinite loop in the request

509 Bandwidth Limit Exceeded
The server reached the bandwidth limit. This is not an official status code, but is still widely used.

510 Not Extended
The strategies required to obtain resources are not met. (RFC 2774)

How to deal with common errors

500 Error

500 error is a problem that webmasters often encounter. Based on my experience, the reasons and solutions are summarized as follows:

1. There are too many running users, which puts too much pressure on the server. If the server cannot respond, an HTTP500 error will be reported.

This reason is the main reason why websites report 500 errors. Why do many websites suddenly report 500 errors (service unavailable)? 90% are caused by excessive space pressure, exceeding the upper limit set by the space provider.

When encountering this problem, it is best to contact the after-sales service of the space provider as soon as possible. They will usually help you recycle the application pool and the problem will be solved. If you cannot find after-sales service, you can find the "Recycle Application Pool" item in the space management background and execute it manually. However, some space management backends do not provide this service.

2. If the first possibility is ruled out, then the main reason is that there is a problem with the program.

You can make a simple test page to see if it can run successfully, and then detect the error page to make targeted modifications.

If the association is not made where the association should be made, an HTTP500 error will be reported. Perform manual or automatic correlation and the problem is solved.

3. If the operation performed in the test requires inserting data into the database, it is possible that if the large amount of data causes the table space in the database to be full, or the buffer pool is too small to satisfy the data access, etc. Resulting in HTTP500 error.

The solution is to adjust the database, modify the connection pool size, etc., and make corrections according to individual circumstances.



1**: Request received, continue processing
2**: Operation received successfully, analyzed and accepted
3**: This request must be processed further
4** : The request contained an incorrect syntax or could not be completed
5**: The server failed to perform a fully valid request

100 - The client must continue making the request
101 - The client asked the server to convert HTTP based on the request Protocol version

200 - Transaction successful
201 - Prompt to know the URL of the new file
202 - Accepted and processed, but the processing is not completed
203 - Return information is uncertain or Incomplete
204 - The request was received, but the return information was empty
205 - The server completed the request, the user agent must reset the currently browsed files
206 - The server has completed some users GET request

300 - The requested resource is available in multiple places
301 - Delete the request data
302 - The request data was found at another address
303 - Clients advised Access other URLs or access methods
304 - The client has performed GET, but the file has not changed
305 - The requested resource must be obtained from the address specified by the server
306 - In the previous version of HTTP The code used is no longer used in the current version
307 - Declaring that the requested resource is temporarily deleted

400 - Wrong request, such as syntax error
401 - Request authorization failed
402 - Retain valid ChargeTo header response
403 - Request not allowed
404 - No file, query or URL found
405 - The method defined by the user in the Request-Line field is not allowed
406 - According to the Accept message sent by the user, the requested resource is inaccessible
407 - Similar to 401, the user must first obtain authorization on the proxy server
408 - The client did not complete the request within the time specified by the user
409 - The request cannot be completed for the current resource status
410 - This resource no longer exists on the server and there is no further reference address
411 - The server rejects the user-defined Content-Length attribute request# ##412 - One or more request header fields are incorrect in the current request
413 - The requested resource is larger than the server allows
414 - The requested resource URL is longer than the server allows
415 ——The requested resource does not support the request item format
416——The request contains the Range request header field, there is no range indication value within the current request resource range, and the request
does not contain the If-Range request header field
417 - The server does not meet the expectations specified in the Expect header field of the request. If it is a proxy server, it may be that the next level server cannot meet the request

500 - The server generated an internal error
501—— The server does not support the requested function
502 - The server is temporarily unavailable, sometimes to prevent system overload
503 - The server is overloaded or suspended for maintenance
504 - The gateway is overloaded, the server uses another gateway or The service responds to the user with a long waiting time setting
505 - The server does not support or refuses to support the HTTP version specified in the request header

============== =============================================
## #English version:

100: Continue
101: Switching Protocols
102: Processing

200:OK
201:Created
202:Accepted
203:Non-Authoriative Information
204:No Content
205:Reset Content
206:Partial Content
207:Multi-Status

300:Multiple Choices
301:Moved Permanently
302:Found
303:See Other
304:Not Modified
305:Use Proxy
306:(Unused)
307:Temporary Redirect

400:Bad Request
401:Unauthorized
402:Payment Granted
403:Forbidden
404:File Not Found
405:Method Not Allowed
406:Not Acceptable
407:Proxy Authentication Required
408:Request Time-out
409:Conflict
410:Gone
411:Length Required
412:Precondition Failed
413:Request Entity Too Large
414:Request-URI Too Large
415:Unsupported Media Type
416:Requested range not satisfiable
417:Expectation Failed
422:Unprocessable Entity
423:Locked
424:Failed Dependency

500:Internal Server Error
501:Not Implemented
502:Bad Gateway
503:Service Unavailable
504:Gateway Timeout
505:HTTP Version Not Supported
507:Insufficient Storage 
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template