Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android HttpClient: Circular redirect error

Hello,

I am trying to upgrade project from 1.7.0 to 1.7.3. The first problem is that one of my http requests ends with following error:

D/TiHttpClient(  462): (TiHttpClient-3) [940,4307] clearing the expired and idle connections
E/TiHttpClient(  462): (TiHttpClient-3) [1,4308] HTTP Error (org.apache.http.client.ClientProtocolException): Circular redirect to 'https://url.com'
E/TiHttpClient(  462): org.apache.http.client.ClientProtocolException
E/TiHttpClient(  462):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:557)
E/TiHttpClient(  462):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653)
E/TiHttpClient(  462):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)
E/TiHttpClient(  462):     at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1002)
E/TiHttpClient(  462):     at java.lang.Thread.run(Thread.java:1096)
E/TiHttpClient(  462): Caused by: org.apache.http.client.CircularRedirectException: Circular redirect to 'https://url.com'
E/TiHttpClient(  462):     at org.apache.http.impl.client.DefaultRedirectHandler.getLocationURI(DefaultRedirectHandler.java:173)
E/TiHttpClient(  462):     at ti.modules.titanium.network.TiHTTPClient$RedirectHandler.getLocationURI(TiHTTPClient.java:167)
E/TiHttpClient(  462):     at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:892)
E/TiHttpClient(  462):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:457)
E/TiHttpClient(  462):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
E/TiHttpClient(  462):     ... 4 more
I/TiHttpClient(  462): (TiHttpClient-3) [11,4319] Sending error Circular redirect to 'https://url.com'

I know that url that I access makes few redirects but I did not undersrand why HttpClient in 1.7.3 do not work with it. I saw this error with 1.7.0 too but it was very rarely. With 1.7.3 or 1.7.2 this error occurs each time. On ios it works fine.

I use Android 2.2 but tried to build with 2.3.3 and got the same issue.

Will appreciate any help. Thanks.

— asked October 20th 2011 by Ivan G
  • android
  • circular redirect
  • httpclient
2 Comments
  • you are going to have to provide some code

    — commented October 21st 2011 by Aaron Saunders
  • It is no longer actual with 1.7.5

    — commented November 14th 2011 by Ivan G

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.