commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Sutton <>
Subject RE: [httpclient] Handling Yahoo redirect...
Date Tue, 28 Oct 2003 23:51:45 GMT
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:

I don't have time to do up a full example at the moment but the structure
will be:

int status = -1;
String url = "";
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.


Adrian Sutton, Software Engineer
Ephox Corporation 

-----Original Message-----
From: Adrian Sutton []
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"


Adrian Sutton, Software Engineer
Ephox Corporation 

-----Original Message-----
From: Joe Ryburn []
Sent: Wednesday, 29 October 2003 8:24 AM
Subject: Handling Yahoo redirect...

When loggin in to Yahoo mail, after a successful post of data the following
URL is returned...
When I redirect the connection to that URL then I get the exception...
WARNING: Invalid Redirect URI from:
I understand I need to handle this manually, but I'm unsure how to proceed.
Anyone solved this before me?

Joe Ryburn 

Affiliated Foods Southwest 
12103 Interstate 30 
Little Rock, AR 72203-3627 
501-455-3590 extension 6319 


View raw message