What does HTTP/1.1 302 mean exactly?

后端 未结 14 2491
礼貌的吻别
礼貌的吻别 2020-12-02 05:49

Some article I read once said that it means jumping (from one URI to another), but I detected this \"302\" even when there was actually no jumping at all!

14条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-02 06:01

    According to RFC 1945/Hypertext Transfer Protocol - HTTP / 1.0:

       302 Moved Temporarily
    
       The requested resource resides temporarily under a different URL.
       Since the redirection may be altered on occasion, the client should
       continue to use the Request-URI for future requests.
    
       The URL must be given by the Location field in the response. Unless
       it was a HEAD request, the Entity-Body of the response should
       contain a short note with a hyperlink to the new URI(s).
    
       If the 302 status code is received in response to a request using
       the POST method, the user agent must not automatically redirect the
       request unless it can be confirmed by the user, since this might
       change the conditions under which the request was issued.
    
           Note: When automatically redirecting a POST request after
           receiving a 302 status code, some existing user agents will
           erroneously change it into a GET request.
    

提交回复
热议问题