HTTP protocol status code

The first digit of the status code defines the type of response. The last two digits do not have any classified roles.

The first digit has five values:

-1xx: report - receiving a request to continue the process.

-2xx: Success - step successfully received, understood, and accepted.

-3xx: retransmission - in order to complete the request, must take further measures.

-4xx: Client Error - The request includes the wrong order or can not be completed.

-5xx: Server Error - The server was unable to complete an apparently valid request.

Include HTTP / 1.1 code state value defined below, and the examples of the reason phrase (Reason-Phrase) corresponding to, for reference only occasional inquiries.

 Status-Code

"100"; continue    

"101"; protocol conversion     

         

"200" ;  OK

"201"; created         

"202"; accepted         

"203"; a non-authoritative information   

"204"; no content       

"205"; Reset Content      

"206"; local content    

  

"300"; multiple choice      

"301"; Moved Permanently      

"302"; created          

"303"; observe the other part          

"304"; readonly                  

"305"; User Agent              

"307"; temporary retransmission    

          

"400"; Bad Request                

"401"; unauthorized              

"402"; necessary to pay            

"403"; disabled                  

"404"; not found                 

"405"; impermissible manner          

"406"; do not accept                 

"407"; proxy authentication required

"408"; Request Timeout              

"409"; conflict                  

"410"; Stop                  

"411"; the required length            

"412"; Precondition Failed            

"413"; Request Entity Too Large      

"414"; Request too -URI      

"415"; Unsupported media types   

"416"; scope of the request is not met  

"417"; expect failure           

"500"; internal server error       

"501"; not implemented             

"502"; bad gateway               

"503"; service can not be achieved         

"504"; Gateway Timeout             

"505"; HTTP version is not supported  

Spreading code   

extension-code =3DIGIT

Reason-Phrase = *<TEXT,excluding CR,LF>

HTTP status code is extensible. HTTP application does not need to understand the meaning of all registered status codes, though that kind of understanding is very obvious cost-effective. However, the application must be aware of the type specified by the first digit of the status code, any response should not be seen as recognition of the type of x00 state, with one exception that is unrecognized response can not be cached. For example, if the client receives a status code 431 is not recognized, the request can be safely assumed faulty and would treat it as if it receives the response code in response to a state 400. In this case, the user agent (user agent) should be submitted with the entity and in response to the user because it is the entity may include human readable information on the interpretation of an abnormal condition.

The last interview when asked this question, in addition to know 403 and 404, the other are not answer, although the record seems to remember stuff ~ ~ not much use, but also reflects lack of experience ah! ! ! !

Reproduced in: https: //www.cnblogs.com/huajia/archive/2011/05/24/2055823.html

Guess you like

Origin blog.csdn.net/weixin_34092455/article/details/93621569