Website returns 302 instead of 200

前端 未结 6 908
深忆病人
深忆病人 2021-02-07 23:38

Well this one freaks me out. I used a Http Header check tool to check the headers of my webpage and guess what. In every request the response was 302 instead of 200.

         


        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-08 00:05

    Maybe a case of this:

    302 Found

    This is the most popular redirect code, but also an example of industrial practice contradicting the standard. HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours. However, the majority of Web applications and frameworks still use the 302 status code as if it were the 303.

    303 See Other (since HTTP/1.1)

    The response to the request can be found under another URI using a GET method. When received in response to a PUT, it should be assumed that the server has received the data and the redirect should be issued with a separate GET message.

    http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

提交回复
热议问题