hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: does not seem to be getting all the cookie
Date Sun, 25 Oct 2009 13:15:11 GMT
Randy Paries wrote:
> Hello,
> in my client i am going to a page and then doing the following?:
> 
>             Cookie[] cookies = client.getState().getCookies();
>             System.out.println("Present cookies: ");
>             for (int i = 0; i < cookies.length; i++) {
>                 System.out.println(" - " + cookies[i].toExternalForm());
>             }
> 
> All i get in the print out is
> - session=8b45p8i4b0uk899iggk1kvht35
> 
> yet via firebug or fiddler when i go to this page via a browser
> i see these
> Cookie	AWSUSER_ID=awsuser_id1256241083831r6937;
> AWSSESSION_ID=awssession_id1256241083831r6937;
> __utma=235052179.1675139821.1256241084.1256241084.1256242294.2;
> __utmb=235052179.5.10.1256242294;
> __utmz=235052179.1256241084.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
> 
> Any suggestions on what i am doing wrong??
> 
> thanks
> Randy
> 

Randy,

Most likely other cookies got rejected as invalid due to the selected 
cookie policy. For details see:

http://hc.apache.org/httpclient-3.x/cookies.html

Oleg

PS: Also, consider upgrading to HttpClient 4.0, which can pick a more 
lenient cookie policy automatically based on properties of the SetCookie 
response headers.

Oleg


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


Mime
View raw message