commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@bluewin.ch>
Subject Re: HttpClient: Maximum redirects (100) exceeded
Date Wed, 07 Apr 2004 19:22:48 GMT
Stephen,
In case HttpClient 2.0 is unable to redirect a request, it simply gives
up and returns the respective status code. Cross-cite redirect should
not be causing a redirect loop.

Anyhow, I still think you should post the complete log, as at the moment
it is still unclear why HttpClient loops indefinitely. My guess is that
this may be due to swab/AddressMain.do redirecting to cgi-bin/ssoswab
and cgi-bin/ssoswab redirecting back to swab/AddressMain.do, thus
infinite loop

Oleg


On Wed, 2004-04-07 at 21:01, Stephen Charles Huey wrote:
> I hope I didn't scare any knowledgable folks off with too much info in my
> last email.  Someone suggested I run a wire trace log, so I did, but I'm
> wondering if this one part might be the clincher:
> 
> 2004/04/07 09:38:59:306 CDT [DEBUG] HttpMethodBase - -Redirecting from
> 'https://www.fedex.com:443/swab/AddressMain.do' to
> 'https://www.fedex.com/cgi-bin/ssoswab;SWABSESSIONID=A0S85B1LbPcoaGqyWhaC7m4x6gxJ3ptWQa2gGiFlp1I1DoPWJA0W!1270069690!wwls9.sac.fedex.com!7998!7002?cc_lang=us_en&returnurl=https://www.fedex.com/swab/AddressMain.do?appID%3DFSM%26cc_lang%3Dus%26cc%3Dus%26language%3Dus%26sType%3D%26gnd_flag%3DY%26dgalc%3DN
> 
> 2004/04/07 09:38:59:446 CDT [DEBUG] HttpMethodBase - -Should close
> connection in response to Connection: close
> 
> 
> I know HttpClient doesn't redirect to different domains, but this
> shouldn't count as another domain...I'm wondering if it's thinking it's
> another domain or if it's a similar problem, though.  
> 
> Thanks,
> Stephen
> 
> 
> 
> 
> ----- Original message -----
> From: "Stephen Charles Huey" <stephenhuey@fastmail.fm>
> To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
> Date: Wed, 07 Apr 2004 10:12:02 -0500
> Subject: Re: HttpClient:  Maximum redirects (100) exceeded
> 
> I didn't copy all of my message here.  Basically, my problem is that I'm
> getting this when trying to execute a simple GET:
> 
> Apr 7, 2004 10:00:54 AM org.apache.commons.httpclient.HttpMethodBase
> execute
> 
> SEVERE: Narrowly avoided an infinite loop in execute
> 
> org.apache.commons.httpclient.HttpRecoverableException: Maximum redirects
> (100) exceeded
> 
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1111)
> 
> 
> I've been doing this for a long time, but something changed on the
> website and I guess that change is making me go into an infinite loop, so
> I'm trying to figure out how to get around that so I can download my
> addresses with this Java program once again.  The statement "Execute loop
> try 1" will show up 100 times in my wire trace log, and it just tries the
> same block of code below each time.  I don't understand a lot of it, but
> I'm particularly wondering what it means when it says "Should close
> connection in response to Connection: close".  I'm also wondering why the
> socket appears to be stale...I had to use a GET and a POST and a GET
> before this point, so there has been plenty of activity!  
> 
> 
> 
> 2004/04/07 09:38:56:211 CDT [DEBUG] HttpConnection -
> -HttpConnection.setSoTimeout(0)
> 
> 2004/04/07 09:38:56:361 CDT [DEBUG] HttpConnection - -An error occurred
> while reading from the socket, is appears to be stale
> <java.net.SocketException: Socket Closed>java.net.SocketException: Socket
> Closed
> 
> 	at java.net.PlainSocketImpl.setOption(Unknown Source)
> 
> 	at java.net.Socket.setSoTimeout(Unknown Source)
> 
> 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.setSoTimeout(Unknown Source)
> 
> 	at org.apache.commons.httpclient.HttpConnection.isStale(HttpConnection.java:542)
> 
> 	at org.apache.commons.httpclient.HttpConnection.isOpen(HttpConnection.java:468)
> 
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:660)
> 
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529)
> 
> 	at FedexWebImporter.importAll(FedexWebImporter.java:82)
> 
> 	at FedexWebImporter.main(FedexWebImporter.java:156)
> 
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 
> 	at koala.dynamicjava.interpreter.EvaluationVisitor.visit(EvaluationVisitor.java:666)
> 
> 	at edu.rice.cs.drjava.model.repl.EvaluationVisitorExtension.visit(EvaluationVisitorExtension.java:254)
> 
> 	at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:107)
> 
> 	at edu.rice.cs.drjava.model.repl.DynamicJavaAdapter$InterpreterExtension.interpret(DynamicJavaAdapter.java:493)
> 
> 	at edu.rice.cs.drjava.model.repl.DynamicJavaAdapter.interpret(DynamicJavaAdapter.java:96)
> 
> 	at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM$4.run(InterpreterJVM.java:264)
> 
> 
> 
> 2004/04/07 09:38:56:532 CDT [DEBUG] HttpConnection - -Connection is
> stale, closing...
> 
> 2004/04/07 09:38:56:732 CDT [DEBUG] HttpMethodBase - -Execute loop try 1
> 
> 2004/04/07 09:38:56:852 CDT [DEBUG] wire - ->> "GET
> /swab/AddressMain.do?appID=FSM&cc_lang=us&cc=us&language=us&sType=&gnd_flag=Y&dgalc=N
> HTTP/1.1[\r][\n]"
> 
> 2004/04/07 09:38:56:952 CDT [DEBUG] HttpMethodBase - -Adding Host request
> header
> 
> 2004/04/07 09:38:57:062 CDT [DEBUG] wire - ->> "User-Agent: Jakarta
> Commons-HttpClient/2.0final[\r][\n]"
> 
> 2004/04/07 09:38:57:203 CDT [DEBUG] wire - ->> "Host:
> www.fedex.com[\r][\n]"
> 
> 2004/04/07 09:38:57:343 CDT [DEBUG] wire - ->> "Cookie: $Version=0;
> fdx_login=41.bb83.4d658350; $Domain=.fedex.com; $Path=/[\r][\n]"
> 
> 2004/04/07 09:38:57:493 CDT [DEBUG] wire - ->> "Cookie: $Version=0;
> fdx_appname=inet; $Domain=.fedex.com; $Path=/[\r][\n]"
> 
> 2004/04/07 09:38:57:693 CDT [DEBUG] wire - ->> "[\r][\n]"
> 
> 2004/04/07 09:38:57:813 CDT [DEBUG] wire - -<< "HTTP/1.1 302 Moved
> Temporarily[\r][\n]"
> 
> 2004/04/07 09:38:57:944 CDT [DEBUG] wire - -<< "Server:
> Netscape-Enterprise/4.1[\r][\n]"
> 
> 2004/04/07 09:38:58:084 CDT [DEBUG] wire - -<< "Date: Wed, 07 Apr 2004
> 14:38:52 GMT[\r][\n]"
> 
> 2004/04/07 09:38:58:234 CDT [DEBUG] wire - -<< "Location:
> https://www.fedex.com/cgi-bin/ssoswab;SWABSESSIONID=A0S85B1LbPcoaGqyWhaC7m4x6gxJ3ptWQa2gGiFlp1I1DoPWJA0W!1270069690!wwls9.sac.fedex.com!7998!7002?cc_lang=us_en&returnurl=https://www.fedex.com/swab/AddressMain.do?appID%3DFSM%26cc_lang%3Dus%26cc%3Dus%26language%3Dus%26sType%3D%26gnd_flag%3DY%26dgalc%3DN[\r][\n]"
> 
> 2004/04/07 09:38:58:384 CDT [DEBUG] wire - -<< "Content-Type:
> text/html[\r][\n]"
> 
> 2004/04/07 09:38:58:525 CDT [DEBUG] wire - -<< "Set-Cookie:
> SWABSESSIONID=A0S85B1LbPcoaGqyWhaC7m4x6gxJ3ptWQa2gGiFlp1I1DoPWJA0W!1270069690!wwls9.sac.fedex.com!7998!7002;
> path=/[\r][\n]"
> 
> 2004/04/07 09:38:58:695 CDT [DEBUG] wire - -<< "Connection:
> close[\r][\n]"
> 
> 2004/04/07 09:38:58:845 CDT [DEBUG] HttpMethodBase - -Cookie accepted:
> "$Version=0;
> SWABSESSIONID=A0S85B1LbPcoaGqyWhaC7m4x6gxJ3ptWQa2gGiFlp1I1DoPWJA0W!1270069690!wwls9.sac.fedex.com!7998!7002;
> $Path=/"
> 
> 2004/04/07 09:38:58:995 CDT [DEBUG] HttpMethodBase - -Redirect required
> 
> 2004/04/07 09:38:59:205 CDT [DEBUG] HttpMethodBase - -Redirect requested
> to location
> 'https://www.fedex.com/cgi-bin/ssoswab;SWABSESSIONID=A0S85B1LbPcoaGqyWhaC7m4x6gxJ3ptWQa2gGiFlp1I1DoPWJA0W!1270069690!wwls9.sac.fedex.com!7998!7002?cc_lang=us_en&returnurl=https://www.fedex.com/swab/AddressMain.do?appID%3DFSM%26cc_lang%3Dus%26cc%3Dus%26language%3Dus%26sType%3D%26gnd_flag%3DY%26dgalc%3DN'
> 
> 2004/04/07 09:38:59:306 CDT [DEBUG] HttpMethodBase - -Redirecting from
> 'https://www.fedex.com:443/swab/AddressMain.do' to
> 'https://www.fedex.com/cgi-bin/ssoswab;SWABSESSIONID=A0S85B1LbPcoaGqyWhaC7m4x6gxJ3ptWQa2gGiFlp1I1DoPWJA0W!1270069690!wwls9.sac.fedex.com!7998!7002?cc_lang=us_en&returnurl=https://www.fedex.com/swab/AddressMain.do?appID%3DFSM%26cc_lang%3Dus%26cc%3Dus%26language%3Dus%26sType%3D%26gnd_flag%3DY%26dgalc%3DN
> 
> 2004/04/07 09:38:59:446 CDT [DEBUG] HttpMethodBase - -Should close
> connection in response to Connection: close
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


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


Mime
View raw message