You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Marcelo Chryssovergis <ma...@iea.org.br> on 2005/07/26 14:50:27 UTC

CircularRedirectException

Hello my friends

I´m trying to log in to a site that uses both cookies AND session control.

Here what am I doing:

I enter the site
Get the cookies
Send the cookies back (with the date changed, from null to a valid date)
Do the login (with PostMethod)

At this moment, I verify if I have to logoff the oppened session left
behind. And almost aways I have this connection open. When I send the url
responsible to execute de logoff (with GetMethod), I get an exception: 

org.apache.commons.httpclient.CircularRedirectException: Circular redirect
to 'http://www.siteI´mWorking.com:80/'

How can I fix it??

I guess I have to log off then log in again, because de session is pendent
at the server.. 

Thanks a lot!

Marcelo




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: CircularRedirectException

Posted by Roland Weber <RO...@de.ibm.com>.
Hi Marcelo,

disable redirects by calling HttpMethod.setFollowRedirects(false).

There is no need to change the date of a cookie. Cookies without
a date are supposed to live as long as the browser/client session,
which is exactly what's happening with HttpClient.

hope that helps,
  Roland





"Marcelo Chryssovergis" <ma...@iea.org.br> 
26.07.2005 09:50
Please respond to
"HttpClient User Discussion"


To
"'HttpClient User Discussion'" <ht...@jakarta.apache.org>
cc

Subject
CircularRedirectException






Hello my friends

I´m trying to log in to a site that uses both cookies AND session control.

Here what am I doing:

I enter the site
Get the cookies
Send the cookies back (with the date changed, from null to a valid date)
Do the login (with PostMethod)

At this moment, I verify if I have to logoff the oppened session left
behind. And almost aways I have this connection open. When I send the url
responsible to execute de logoff (with GetMethod), I get an exception: 

org.apache.commons.httpclient.CircularRedirectException: Circular redirect
to 'http://www.siteI´mWorking.com:80/'

How can I fix it??

I guess I have to log off then log in again, because de session is pendent
at the server.. 

Thanks a lot!

Marcelo




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org