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 21:12:34 GMT
It's pretty clear what is going on. The server keeps on bouncing the
request from /swab/AddressMain.do to /cgi-bin/ssoswab and back, so no
wonder there's a redirect loop. Possibly the script does not like
SWABSESSIONID or a cookie. I have little idea of what the web
application is supposed to do, so I can't tell. At least as far as
HttpClient is concerned, everything appears fine. HttpClient does what
it is asked to do

Oleg 

[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] wire - -<< "HTTP/1.1 302 Moved Temporarily[\r][\n]"2004/04/07
09:38:57:944 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 - ->> "GET
/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
HTTP/1.1[\r][\n]"2004/04/07 09:39:00:007 CDT 
...
[DEBUG] wire - -<< "HTTP/1.1 302 Moved Temporarily[\r][\n]"2004/04/07
09:39:01:749 CDT 
...
[DEBUG] HttpMethodBase - -Redirect requested to location
'https://www.fedex.com/swab/AddressMain.do?appID=FSM&cc_lang=us&cc=us&language=us&sType=&gnd_flag=Y&dgalc=N'2004/04/07
09:39:02:590 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:39:03:371 CDT 
...
[DEBUG] wire - -<< "HTTP/1.1 302 Moved Temporarily[\r][\n]"2004/04/07
09:39:04:603 CDT 
...
[DEBUG] wire - -<< "Location:
https://www.fedex.com/cgi-bin/ssoswab;SWABSESSIONID=A0SDE7DJdKhcEIDDBsLU68vE8yTaQnhKsPt76it7lINX6vG2t82u!1270069690!wwls9.sac.
...
[DEBUG] wire - ->> "GET
/cgi-bin/ssoswab;SWABSESSIONID=A0SDE7DJdKhcEIDDBsLU68vE8yTaQnhKsPt76it7lINX6vG2t82u!1270069690!wwls9.sac.fedex.com!7998!7002?
...
[DEBUG] wire - -<< "HTTP/1.1 302 Moved Temporarily[\r][\n]"2004/04/07
09:39:07:918 CDT 
...
[DEBUG] wire - -<< "Location:
https://www.fedex.com/swab/AddressMain.do?appID=FSM&cc_lang=us&cc=us&language=us&sType=&gnd_flag=Y&dgalc=N[\r][\n]"2004/04/07
09:39:08:279 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:39:09:520 CDT 
...
[DEBUG] wire - -<< "HTTP/1.1 302 Moved Temporarily[\r][\n]"2004/04/07
09:39:10:552 CDT 
...
[DEBUG] wire - -<< "Location:
https://www.fedex.com/cgi-bin/ssoswab;SWABSESSIONID=A0SJVtaEdfgAwlMMdWwreBxYBHxg2N7DgiNzeH59Ejr62gbXbCoa!1270069690!wwls9.sac.
...
[DEBUG] wire - ->> "GET
/cgi-bin/ssoswab;SWABSESSIONID=A0SJVtaEdfgAwlMMdWwreBxYBHxg2N7DgiNzeH59Ejr62gbXbCoa!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
HTTP/1.1[\r][\n]"2004/04/07 09:39:12:705 CDT 
...
[DEBUG] wire - -<< "HTTP/1.1 302 Moved Temporarily[\r][\n]"2004/04/07
09:39:14:007 CDT 
...
[DEBUG] wire - -<< "Location:
https://www.fedex.com/swab/AddressMain.do?appID=FSM&cc_lang=us&cc=us&language=us&sType=&gnd_flag=Y&dgalc=N[\r][\n]"2004/04/07



On Wed, 2004-04-07 at 22:49, Stephen Charles Huey wrote:
> I tried to reply to the list, but the wire trace made the email too big,
> so hopefully you can see what you're looking for.  It's attached as a
> text file.  
> 
> I don't see why it would be redirecting back and forth like that if it
> doesn't do that when you browse in a web browser.  It's just a GET
> request.  Anyway, any pointers would be appreciated!  
> 
> If you think I should post a subset of the wire trace back to the list,
> please let me know.  
> 
> Thanks,
> Stephen
> 
> 
> 
> ----- Original message -----
> From: "Oleg Kalnichevski" <olegk@bluewin.ch>
> To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
> Date: Wed, 07 Apr 2004 21:22:48 +0200
> Subject: Re: HttpClient:  Maximum redirects (100) exceeded
> 
> 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
> 


---------------------------------------------------------------------
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