Re: [Htmlparser-user] Cookie handling
Brought to you by:
derrickoswald
From: Derrick O. <der...@ro...> - 2007-01-30 12:36:59
|
Hello,=0A=0AIn my experience, you will need both redirection processing and= cookie processing.=0AThe general scenario is a page is returned with cooki= e's and a redirect.=0AIf the redirect is taken, the server looks for the co= okie it tried to set with the first page.=0AYou can monitor the traffic in = the header by implementing ConnectionMonitor (like the Parser).=0A=0ADerric= k=0A=0A----- Original Message ----=0AFrom: Gavin Gilmour <gavin@brokentrain= .net>=0ATo: htm...@li...=0ASent: Tuesday, January = 30, 2007 5:59:41 AM=0ASubject: [Htmlparser-user] Cookie handling=0A=0AHi, I= hope this is the correct place to ask the mailing list is looking pretty= =0Aquiet according to sourceforge's mail archives :)=0A=0AI've ran into dif= ficulty parsing certain sites that attempt to set cookies in=0Aan effort to= read them later. The sites in question generally spit back pages=0Asaying = that your browser or whatever is misconfigured and deny access. I assume=0A= this is simply because they can't read the cookies that should've been set = and=0AI wondered if there was an option to do so somewhere.=0A=0AI'm not tr= ying to set *actual* cookies which most of the examples I've seen=0Aindicat= e how to do, but just allow pages to dump cookies and read them later.=0AIs= this possible or (possibly) unrealistic and difficult to implement?=0A=0AT= he current code I've got is:=0A=0A...=0AConnectionManager manager =3D Parse= r.getConnectionManager();=0Amanager.setRedirectionProcessingEnabled(false);= =0Amanager.setCookieProcessingEnabled(true);=0AParser parser =3D new Parser= (...);=0A----=0A=0Aetc.=0A=0A=0ACheers for any responses!=0A=0AGavin.=0A=0A= -------------------------------------------------------------------------= =0ATake Surveys. Earn Cash. Influence the Future of IT=0AJoin SourceForge.n= et's Techsay panel and you'll get the chance to share your=0Aopinions on IT= & business topics through brief surveys - and earn cash=0Ahttp://www.techs= ay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV=0A_________= ______________________________________=0AHtmlparser-user mailing list=0AHtm= lpa...@li...=0Ahttps://lists.sourceforge.net/lists/li= stinfo/htmlparser-user=0A=0A=0A=0A=0A |