简体   繁体   中英

HTTP 303 redirect is not working for my browsers

My jersey resource is sending this to the client browsers namely (safari & chrome) but the browsers are not redirecting. Is there anything wrong with my HTTP response below ?

HTTP/1.1 303 See Other
Date: Thu, 12 Nov 2009 10:17:23 GMT
Location: http://twitter.com/oauth/authenticate?oauth_token=KNHo4mcLMJG
Content-Length: 0
Server: Jetty(6.1.14)

您应该使用302代替303,而不是301,因为301表示页面已永久移动,并且书签和链接可以更新(语义完全不同),而浏览器中的302实际上意味着与303相同:应该使用GET获取的临时重定向(即使原始请求是POST,也不是POST;该行为保留给307)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM