Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Redirect during POST processing

Hi,

On Thu, Nov 29, 2012 at 9:55 PM, Oliver Wulff <owulff@xxxxxxxxxx> wrote:
> Hi there
>
> I was implementing the federation authenticator for jetty where I followed
> the example of the FormAuthenticator. I wrote a testcase with HttpClient and
> discovered that the redirect is not processed after posting
> username/password.
>
> The http specs says:
>
> //            http://www.ietf.org/rfc/rfc2616.txt
> //            If the 301 status code is received in response to a request
> other
> //            than GET or HEAD, 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.
>
> As this is not very nice, couldn't we just restore the saved original
> request without redirecting to it?

I think this is handled correctly in Jetty 9's HTTP client.
Check it out: http://webtide.intalio.com/2012/11/the-new-jetty-9-http-client/

What Jetty version are you using ?

Simon
--
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz


Back to the top