Re: [Htmlparser-developer] unlimited unconnected status in ConnectionManager.java
Brought to you by:
derrickoswald
From: Derrick O. <der...@gm...> - 2010-09-21 17:02:39
|
This code snippet is only activated when redirection happens. The HTTP standard <http://www.w3.org/Protocols/rfc2616/rfc2616.html> defines several status codes<http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3> for redirection: - 300 multiple choices (e.g. offer different languages) - 301 moved permanently - 302 found (originally temporary redirect, but now commonly used to specify redirection for unspecified reason) - 303 see other (e.g. for results of cgi-scripts) - 307 temporary redirect When the limit is reached (repeated >= 20) the boolean value of repeat is not set and the outer loop exits. I'm not sure what your problem is in recompiling a modified file. On Tue, Sep 21, 2010 at 10:42 AM, john wu <wj...@gm...> wrote: > Hello, > > I met below problem when I used htmlparser. > > Problem: unlimited try to connect a web site to get the html page, but it > failed in openConnection in ConnectionManager.java. > > Code: > if ((3 == (code / 100)) && (repeated < 20)) > if (null != (uri = getLocation (http))) > { > url = new URL (uri); > repeat = true; > repeated++; > } > > Here if repeated >= 20, then it will always to use the old url. And it will > be in unlimited unconnected status. > > *Am I right?* > > So I try to modify the code, but the compile failed in mvn install and hint > me there are some unexpected characters \65535. > I opened it in eclipse and modified it. > *Who could tell me what is the problem about it?* > > Thank you! > > Br, > > John Wu > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Htmlparser-developer mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-developer > > |