Shame on me. I could have sworn we actually had a redirect example on that page, but apparently we don't. It appears we don't actually have an example atm though you might get lucky in the examples directory even though there's no specific example for redirects: http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/
I don't have time to do up a full example at the moment but the structure will be: int status = -1; String url = "http://www.yahoo.com"; while (status < 200 || status >= 300) { // create method. status = client.excute(method); if (status == REDIRECT) { // check the redirects article for all the redirect status codes url = method.getResponseHeader("Location"); } } If that doesn't help give a yell on the HttpClient-dev list and someone should be able to get a comprehensive example. Regards, Adrian Sutton, Software Engineer Ephox Corporation www.ephox.com -----Original Message----- From: Adrian Sutton [mailto:[EMAIL PROTECTED] Sent: Wednesday, 29 October 2003 9:46 AM To: 'Jakarta Commons Developers List' Subject: RE: [httpclient] Handling Yahoo redirect... Hi Joe, This question is best asked on the HttpClient-dev list as that's where all the HttpClient developers hang out. Fortunately, the answer is pretty simple - you want to take a look at the documentation on our web page, specifically the "Cross hosts redirect guide" at http://jakarta.apache.org/commons/httpclient/redirects.html Regards, Adrian Sutton, Software Engineer Ephox Corporation www.ephox.com -----Original Message----- From: Joe Ryburn [mailto:[EMAIL PROTECTED] Sent: Wednesday, 29 October 2003 8:24 AM To: [EMAIL PROTECTED] Subject: Handling Yahoo redirect... When loggin in to Yahoo mail, after a successful post of data the following URL is returned... http://login.yahoo.com/config/verify?.done=http%3a//my.yahoo.com When I redirect the connection to that URL then I get the exception... WARNING: Invalid Redirect URI from: http://login.yahoo.com:80/config/verify to: http://my.yahoo.com I understand I need to handle this manually, but I'm unsure how to proceed. Anyone solved this before me? Regards, Joe Ryburn Affiliated Foods Southwest 12103 Interstate 30 Little Rock, AR 72203-3627 501-455-3590 extension 6319
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
