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 Ken Krugler <kk...@transpac.com> on 2012/01/31 01:46:22 UTC

No CookiePolicy.IGNORE

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





Re: No CookiePolicy.IGNORE

Posted by Ken Krugler <kk...@transpac.com>.
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





Re: No CookiePolicy.IGNORE

Posted by Oleg Kalnichevski <ol...@apache.org>.
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?

Oleg


> 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


Re: No CookiePolicy.IGNORE

Posted by Ken Krugler <kk...@transpac.com>.
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

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