Share common HTTP status codes

This content excerpt from RUNOOB.COM

 

When viewing a Web page, the browser sends a request to the server where the web page. Before determining browser receives and displays the page, where the server returns this page header information (server header) containing a HTTP status code (HTTP Status Code) for responding to the request of the browser.

The most common status code, there are four:

  • 200-- request was successful
  • 301-- resources are permanently transferred to another URL
  • 404 - the requested resource does not exist
  • 500 - Internal Server Error

HTTP status code classification

HTTP status code of three decimal digits, the first decimal digit status code defines the type, the two figures are not classified effect. HTTP status code is divided into five types:

HTTP status code classification
classification Category Description
1** Information, the server receives the request, the requester needs to continue operation
2** Successful operation has been successfully received and processed
3** Redirection, further action is required to complete the request
4** Client error, the request contains a syntax error or could not fulfill the request
5** Server Error The server error has occurred during the processing of the request

 

 

 

 

 

 

 

 

 

HTTP status code list:

HTTP status code list
status code Status Code English name Chinese description
100 Continue carry on. Client should continue its request
101 Switching Protocols Handover protocol. The protocol server switching request from a client. Only to switch to higher-level protocols, such as switching to a new version of the HTTP protocol
 
200 OK Request was successful. GET and POST requests are generally used for
201 Created It has been created. Request and successfully created a new resource
202 Accepted accepted. We have accepted the request, but did not complete the process
203 Non-Authoritative Information Unauthorized information. Request was successful. But returned meta information not in the original server, but a copy of the
204 No Content No content. The server successfully processed, but did not return content. In the case of a web page is not updated, you can ensure that the browser continues to display the current document
205 Reset Content Reset content. Server processing is successful, the user terminal (for example: a browser) should reset the document view. This return code can clear your browser's form fields
206 Partial Content Part. The server successfully processed a partial GET request
 
300 Multiple Choices multiple choices. Resource request may include a plurality of positions, a list of the corresponding return address and resource for a user terminal (e.g.: Browser) selected
301 Moved Permanently Permanent move. The requested resource has been permanently moved to a new URI, return information will include new URI, the browser will automatically be directed to the new URI. Any future new request should be used instead of the new URI
302 Found Temporary move. Similar to the 301. But the resource only temporarily moved. The client should continue to use the original URI
303 See Other View other addresses. Similar to the 301. Use GET and POST requests View
304 Not Modified Unmodified. When the requested resource is not modified, the server returns this status code does not return any resources. The client typically caches resource visited by a header information indicates that the client wishes to return only resources modified after the specified date
305 Use Proxy Use a proxy. The requested resource must be accessed through a proxy
306 Unused It has been abandoned HTTP status code
307 Temporary Redirect Temporary Redirect. Similar to the 302. Use GET request is redirected
 
400 Bad Request Syntax error in the client request, the server can not understand
401 Unauthorized Request requires user authentication
402 Payment Required Reserved, for future use
403 Forbidden The server understood the request to the client's request, but refused to execute this request
404 Not Found The server can not find the resources (web) at the request of the client. By this code, web designers can set "you can not find the requested resource" personalized page
405 Method Not Allowed Method client request is prohibited
406 Not Acceptable The server could not complete your request based on the content characteristics requested by the client
407 Proxy Authentication Required Request requires authentication agent, and 401 are similar, but the agent should be used to authorize the requestor
408 Request Time-out Time request sent by the client server waits too long, the timeout
409 Conflict 服务器完成客户端的 PUT 请求时可能返回此代码,服务器处理请求时发生了冲突
410 Gone 客户端请求的资源已经不存在。410不同于404,如果资源以前有现在被永久删除了可使用410代码,网站设计人员可通过301代码指定资源的新位置
411 Length Required 服务器无法处理客户端发送的不带Content-Length的请求信息
412 Precondition Failed 客户端请求信息的先决条件错误
413 Request Entity Too Large 由于请求的实体过大,服务器无法处理,因此拒绝请求。为防止客户端的连续请求,服务器可能会关闭连接。如果只是服务器暂时无法处理,则会包含一个Retry-After的响应信息
414 Request-URI Too Large 请求的URI过长(URI通常为网址),服务器无法处理
415 Unsupported Media Type 服务器无法处理请求附带的媒体格式
416 Requested range not satisfiable 客户端请求的范围无效
417 Expectation Failed 服务器无法满足Expect的请求头信息
 
500 Internal Server Error 服务器内部错误,无法完成请求
501 Not Implemented 服务器不支持请求的功能,无法完成请求
502 Bad Gateway 作为网关或者代理工作的服务器尝试执行请求时,从远程服务器接收到了一个无效的响应
503 Service Unavailable 由于超载或系统维护,服务器暂时的无法处理客户端的请求。延时的长度可包含在服务器的Retry-After头信息中
504 Gateway Time-out 充当网关或代理的服务器,未及时从远端服务器获取请求
505 HTTP Version not supported 服务器不支持请求的HTTP协议的版本,无法完成处理

 

Guess you like

Origin www.cnblogs.com/ForYoungE/p/11115962.html