You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by r....@verchaska.com on 2006/02/08 19:23:53 UTC

Setting Cookie Header

Dear all

I am trying to download a page,I need to send three request to get the
required page.Initially i  have problems ,so i use IE
HttpAnalyser and i find the following


* The response header  Set-Cookie of the first request contains the
cookie information
* The same cookie info was used while  sending (set in request header -
Cookie)  the second and third request.
* There was no Set-Cookie header in the response of second and third
request.

My problem is when i am sending the first request using HttpClient, i am
getting the proper response(the response header Set-cookie contains the
cookie informations).But the cookie header was not set  in the  second and
third request.I  set the cookie request header using setRequestHeader() in
the second and third request header,if i do so i am also not able to get
the required page,

Please give me some inputs on how to handle this.
Thanks

regards
rajapandian


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


Re: Setting Cookie Header

Posted by Roland Weber <RO...@de.ibm.com>.
Hello Rajapandian,

please follow the instructions of the Cookie guide.
http://jakarta.apache.org/commons/httpclient/cookies.html

cheers,
  Roland





r.rajapandian@verchaska.com 
08.02.2006 19:23
Please respond to
"HttpClient User Discussion"


To
httpclient-user@jakarta.apache.org
cc

Subject
Setting Cookie Header






Dear all

I am trying to download a page,I need to send three request to get the
required page.Initially i  have problems ,so i use IE
HttpAnalyser and i find the following


* The response header  Set-Cookie of the first request contains the
cookie information
* The same cookie info was used while  sending (set in request header -
Cookie)  the second and third request.
* There was no Set-Cookie header in the response of second and third
request.

My problem is when i am sending the first request using HttpClient, i am
getting the proper response(the response header Set-cookie contains the
cookie informations).But the cookie header was not set  in the  second and
third request.I  set the cookie request header using setRequestHeader() in
the second and third request header,if i do so i am also not able to get
the required page,

Please give me some inputs on how to handle this.
Thanks

regards
rajapandian


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




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