hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Krugler <kkrugler_li...@transpac.com>
Subject Re: No CookiePolicy.IGNORE
Date Tue, 31 Jan 2012 19:45:43 GMT

On Jan 31, 2012, at 7:30am, Oleg Kalnichevski wrote:

> On Mon, 2012-01-30 at 17:56 -0800, Ken Krugler wrote:
>> OK, answering my own question - because "ignoreCookies" isn't a supported policy.
>> 
>> I assume either one should be added, or the documentation fixed up.
>> 
>> -- Ken
>> 
> 
> Hi Ken
> 
> It appears to be supported since 4.1 (registered with the cookie spec
> registry per default). What makes you thin it is not supported?

The fact that I got a NPE when trying to use "ignoreCookies"

The source of my confusion was that my project's pom.xml had HttpClient 4.1.1 for a dependency,
but the Eclipse project wasn't in sync (hadn't been updated) and was still using 4.0 :(

And I had 4.0 source loaded from SVN, not 4.1/trunk

I've switched to code to use IGNORE_COOKIES instead of my own version of the same, and it's
working:

            HttpClientParams.setCookiePolicy(params, CookiePolicy.IGNORE_COOKIES);

Sorry for the false alarm.

Regards,

-- Ken


>> On Jan 30, 2012, at 4:46pm, Ken Krugler wrote:
>> 
>>> Is there any reason why CookiePolicy doesn't include
>>> 
>>> public static final String IGNORE = "ignoreCookies";
>>> 
>>> As per section 3.4 of http://hc.apache.org/httpcomponents-client-ga/tutorial/html/statemgmt.html,
this should work, right?
>>> 
>>> Just want to make sure it's not absent by design, since I'd like to use that
policy.
>>> 
>>> Thanks,
>>> 
>>> -- Ken
>> 
>> --------------------------
>> Ken Krugler
>> http://www.scaleunlimited.com
>> custom big data solutions & training
>> Hadoop, Cascading, Mahout & Solr
>> 
>> 
>> 
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

--------------------------
Ken Krugler
http://www.scaleunlimited.com
custom big data solutions & training
Hadoop, Cascading, Mahout & Solr





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message