I have the same problem. I did a post and also setFollowRedirects to true.
But it did not go to the Location automatically. I had to
manually read the location from the header and then do a get again. Any
idea?

thanks,

Michelle



                                                                       
             Roland Weber                                              
             <[EMAIL PROTECTED]                                         
             so.net>                                                    To
                                       HttpClient User Discussion      
             02/19/2007 12:52          <[email protected]
             PM                        >                               
                                                                        cc
                                                                       
             Please respond to                                     Subject
             "HttpClient User          Re: Problem posting login       
                Discussion"            information (ajax)              
             <httpclient-user@                                         
             jakarta.apache.or                                         
                    g>                                                 
                                                                       
                                                                       
                                                                       




Hello Marcelo,

> But this url has a redirect!

What is the problem? HttpClient typically follows redirects
automatically if configured to do that:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/HttpMethod.html#setFollowRedirects(boolean)


There are few cases where HttpClient is not allowed to follow
the redirect without user interaction. In that case, your
application will get a 3xx response and you can take the
target URL from the "Location" header in the response.

hope that helps,
  Roland


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

Reply via email to