David

We have no intention of becoming RFC Ayatollahs here. Really. We have planned a 
complete revamp of redirect logic right after 2.0 release. I see no problem in giving 
an option of automatically redirecting POST requests, which would be disabled by 
default, so the HttpClient consumer would have to explicitly enable it.

Feel free to file a bug (feature request) report meanwhile. The request would still 
have to be approved by other HttpClient developers

http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Commons

Cheers

Oleg

-----Original Message-----
From: David Kavanagh [mailto:[EMAIL PROTECTED]
Sent: Freitag, 7. M�rz 2003 17:45
To: Commons HttpClient Project
Subject: Re: post redirect


Thanks,
While I see your point, I also didn't see any nice way to do this 
without yanking a bunch of code out of HttpMethodBase.java and pasting 
it into my application. I'd really like the option of overriding the 
default behaviour to keep my code simpler. Make sense?
I've developing enough years to have seen the tradeoffs between making 
it "perfect" and making it work. I know you are trying to be true to the 
RFC, but I've found that with the web, there are always exceptions!

Regards,
David

Kalnichevski, Oleg wrote:

>David
>
>HttpClient is a library, whereas a browser is a totally different kind of beast.
>
>RFC 2616 says the following:
>
>"...
>   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
>..."
>
>A well-behaving browser should provide the end user with a confirmation dialog or a 
>configuration option to automatically perform POST redirects. HttpClient can't have 
>that luxury, as it is not supposed to be directly interacting with the end user. I am 
>personally convinced that POST redirect should be handled by the application that 
>consumes Httpclient's services. All it basically takes is a retry loop
>
>Does anyone see that differently?
>
>Cheers
>
>Oleg
>
>
>-----Original Message-----
>From: David Kavanagh [mailto:[EMAIL PROTECTED]
>Sent: Freitag, 7. M�rz 2003 17:24
>To: [EMAIL PROTECTED]
>Subject: post redirect
>
>
>I've been working with httpclient for a couple of days to build a Cocoon 
>transformer that helps me build pipelines to navigate web sites and 
>extract data. I've read the parts of RFC2616 that deal with redirects 
>and state they are automatic on the client only for GET and HEAD 
>methods. I know the JDC and a web site I wrote use POST for the login 
>form and issue a redirect as a response. Any browser I've tried this 
>with honors the redirect. I can send some test code I've been using to 
>test the automated login (that includes handling cookies).
>Anyway, I've observed browsers honoring the redirect on a POST, can't 
>httpclient be configured that way? Looking at the source code tells me 
>no. (I've been using 2.0 alpha 3).
>
>Thanks,
>David
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to