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 Oleg Kalnichevski <ol...@apache.org> on 2009/03/01 21:19:24 UTC

Re: Reject Cookies

bo wrote:
> What's the proper way of rejecting cookies in the new HttpClient 4? There's
> no CookiePolicyHandler anymore.

There is no such thing in HttpClient 3.x either.

What do toy mean by 'rejecting cookies'? All cookies? Some cookies?

Oleg

> Thanks,
> 
> Bob S.
> 


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


Re: Reject Cookies

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2009-04-10 at 06:34 -0700, HockeyDave wrote:
> How exactly does one go about "removing protocol interceptors"?
> 
> Here's what I'm doing in 4.0b2 to handle cookies.  My intent is to have as
> fast of a performance as possible and I don't want cookies coming over the
> wire slowing things down.

If you want maximum performance and do not mind sacrificing connection
management, cookie, authentication and redirect handling, just use
HttpCore instead of HttpClient. This should give you 30 to 40% higher
data throughput for small to medium requests compared to HttpClient
3.1.    

http://wiki.apache.org/HttpComponents/HttpClient3vsHttpClient4vsHttpCore

Oleg

> ((DefaultHttpClient) httpClient).setCookieStore(null);
> ((DefaultHttpClient) httpClient).setCookieSpecs(null);
> 
> Here's what I did in 3.1:
> getmethod.getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES);
> 
> Are these correct?


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


Re: Reject Cookies

Posted by HockeyDave <da...@yahoo.com>.
How exactly does one go about "removing protocol interceptors"?

Here's what I'm doing in 4.0b2 to handle cookies.  My intent is to have as
fast of a performance as possible and I don't want cookies coming over the
wire slowing things down.
((DefaultHttpClient) httpClient).setCookieStore(null);
((DefaultHttpClient) httpClient).setCookieSpecs(null);

Here's what I did in 3.1:
getmethod.getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES);

Are these correct?
-- 
View this message in context: http://www.nabble.com/Reject-Cookies-tp22250341p22988108.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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


Re: Reject Cookies

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2009-03-01 at 14:22 -0800, bo wrote:
> Hi Oleg,
> 
> I need to reject all cookies from the site I'm accessing, so that would be a
> single domain
> 

If you want to disable cookie processing altogether, you could just
remove protocol interceptors responsible for processing Set-Cookie
response headers and populating Cookie request headers.

If you want to reject cookies selectively, you have to implement a
custom CookieSpec (or sub-class an existing implementation).

Oleg

> Thanks,
> 
> Bob
> 
> On Sun, Mar 1, 2009 at 12:19 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
> 
> > bo wrote:
> >
> >> What's the proper way of rejecting cookies in the new HttpClient 4?
> >> There's
> >> no CookiePolicyHandler anymore.
> >>
> >
> > There is no such thing in HttpClient 3.x either.
> >
> > What do toy mean by 'rejecting cookies'? All cookies? Some cookies?
> >
> > Oleg
> >
> >  Thanks,
> >>
> >> Bob S.
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >
> >
> 
> 


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


Re: Reject Cookies

Posted by bo <bo...@gmail.com>.
Hi Oleg,

I need to reject all cookies from the site I'm accessing, so that would be a
single domain

Thanks,

Bob

On Sun, Mar 1, 2009 at 12:19 PM, Oleg Kalnichevski <ol...@apache.org> wrote:

> bo wrote:
>
>> What's the proper way of rejecting cookies in the new HttpClient 4?
>> There's
>> no CookiePolicyHandler anymore.
>>
>
> There is no such thing in HttpClient 3.x either.
>
> What do toy mean by 'rejecting cookies'? All cookies? Some cookies?
>
> Oleg
>
>  Thanks,
>>
>> Bob S.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>


-- 
_________________________
"Jump right ahead in my web"
The Rolling Stones.
"Out of Our Heads" 1965