hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albek, Elli \(contractor\)" <ealbek-contrac...@shaklee.com>
Subject RE: Exception parsing cookies
Date Fri, 15 Mar 2013 18:55:33 GMT
Thanks.

Does it make sense to set new IgnoreSpec() on the client as well, or
does it happen automatically when I set CookiePolicy.IGNORE_COOKIES?

E



-----Original Message-----
 Francois-Xavier Bonnet
Sent: Friday, March 15, 2013 2:42 AM
To: HttpComponents Project
Subject: Re: Exception parsing cookies

No, you also have to set a CookieStore in the HttpContext. The
attributes
in the HttpContext you pass as a parameter take precedence over the
default
ones so using an empty HttpContext does not help. Some details here:
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/statemgmt.ht
ml#d5e818

Anyway, in your case the most efficient solution is to tell HttpClient
to
ignore cookies instead of creating a HttpContext that will never be
reused:
httpclient.getParams().setParameter(ClientPNames.COOKIE_POLICY,
CookiePolicy.IGNORE_COOKIES);


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


Mime
View raw message