Re: [Htmlparser-user] Help for using a proxy needed - 1 step further
Brought to you by:
derrickoswald
From: Derrick O. <der...@ro...> - 2007-03-03 04:41:03
|
Reinhart,=0A=0AYou might want to look at:=0A http://sourceforge.net/tracke= r/index.php?func=3Ddetail&aid=3D1597147&group_id=3D24399&atid=3D381399=0Afo= r a patch from Jorge Gelmetti regarding proxies.=0A=0ADerrick=0A=0A----- Or= iginal Message ----=0AFrom: "rei...@ba..." <reinhart.grues= sl...@ba...>=0ATo: htm...@li...=0ASent: Friday= , March 2, 2007 3:20:42 AM=0ASubject: [Htmlparser-user] Help for using a pr= oxy needed - 1 step further=0A=0A=0A@Derrick=0AThank you your reply, i trie= d it with additionaly adding=0A=0Acm.setCookieProcessingEnabled(true);=0Acm= .setRedirectionProcessingEnabled(true);=0A=0Aas you suggested.=0A=0AI still= get an error, but slightly different.=0A=0AThe error messages are:=0A=0Aor= g.htmlparser.util.ParserException: Unexpected end of file from server;=0Aja= va.net.SocketException: Unexpected end of file from server=0A at sun.r= eflect.NativeConstructorAccessorImpl.newInstance0(Native Method)=0A=0A=0ATh= e adapted code (copy from my previous post; descriptive way...):=0A=0Afirst= i set up 2 variables:=0A=0Aps is of class Parser=0Acm of class ConnectionM= anager=0A=0Athen i assign cm the return value of the method getConnectionMa= nager from the=0AParser class=0AThen i set Cookie-processing and Redirectio= n-Processing-Enabled to true (thanks=0Ato Derrick!)=0AIn the next steps i a= ssign the proxy-values using the methods setProxyHost,=0AsetProxyPort, setP= roxyUser and setProxyPassword=0AThe next step is to get a new Parser instan= ce withe a URL as a parameter and=0Aassign it to the ps variable=0A=0AIn th= is step i get the error (please see above)=0A=0A=0AThe hints from Derrick r= eplaces the last line of the error messages=0Aat sun.net.www.http.HttpClien= t.parseHTTPHeader(Unknown Source)=0Aby=0Aat sun.reflect.NativeConstructorAc= cessorImpl.newInstance0(Native Method)=0A=0AThe two new lines seems to help= a little further but not completely.=0A=0AAnyone has another idea what i c= ould try?=0AAny help/hint would be appreciated!=0A=0AIn the meantime i play= around with the request-properties: see what properties=0Aare set and mayb= e set new ones.=0A=0Akind regards,=0AReinhart=0A=0A************************= ***************************************************=0ADiese Information und= eventuelle Anhaenge sind vertraulich =0Aund ausschliesslich zur Kenntnisna= hme durch den oder die =0Agenannten Adressaten bestimmt. Sollten Sie nicht = der =0Avorgesehene Adressat sein, ersuchen wir Sie, uns unverzueglich =0Azu= informieren und die Nachricht zu loeschen. Der Inhalt der =0Afehlgeleitete= n Nachricht darf weder aufgezeichnet noch =0AUnbefugten mitgeteilt oder fue= r irgendwelche Zwecke verwertet =0Awerden. Bitte beachten Sie weiters, dass= trotz hoechstmoeglicher =0ASorgfalt unsererseits aufgrund der technischen = Gegebenheiten =0Aim Internet keine Verantwortung fuer die Existenz von Vire= n =0Auebernommen werden kann.=0A=0AThis message and any attachments are con= fidential and are =0Aonly intended for the recipient(s) to which they have = been =0Aaddressed. If you have received this message in error, please =0Ano= tify the sender immediately and delete the message from =0Ayour system. The= contents of this misdirected mail may not be =0Asaved, recorded or used fo= r any purpose whatsoever or made =0Aavailable to unauthorised persons. This= message has been =0Aprepared and sent with the greatest possible care, inc= luding =0Ascanning for viruses. In spite of this, we assume no liability = =0Awhatsoever for the existence of any viruses.=0A*************************= **************************************************=0A----------------------= ---------------------------------------------------=0ATake Surveys. Earn Ca= sh. Influence the Future of IT=0AJoin SourceForge.net's Techsay panel and y= ou'll get the chance to share your=0Aopinions on IT & business topics throu= gh brief surveys-and earn cash=0Ahttp://www.techsay.com/default.php?page=3D= join.php&p=3Dsourceforge&CID=3DDEVDEV=0A___________________________________= ____________=0AHtmlparser-user mailing list=0AH...@li...urcef= orge.net=0Ahttps://lists.sourceforge.net/lists/listinfo/htmlparser-user=0A= =0A=0A=0A=0A |