views:

172

answers:

1

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)

Thanks

A: 

You should use 302 as an alternative to 303, not 301, because 301 means that the page has permanently moved and bookmarks and links can be updated — a quite different semantic — while 302 in browsers means, in practice, the same thing as 303: a temporary redirect that should be fetched with a GET (not a POST, even if the original request was a POST; that behavior is reserved for 307).

Brandon Craig Rhodes