On Tue, 2008-09-23 at 12:10 +0200, [EMAIL PROTECTED] wrote:
> Hi
> 
> Sorry if this has been raised before, but I have searched and not found
> an answer to this problem
> 
> I am using 4.0-beta1 client, and when I issue a request, i get the
> following message:
> ResponseProcessCookies - CookieSpec not available in HTTP context
> 
> And in the response from the server is that request can not be processed
> du to no support for cookies.
> 
> I have ste the following to no avail:
>       
> client.getParams().setParameter(ClientPNames.COOKIE_POLICY,CookiePolicy.
> BROWSER_COMPATIBILITY);
>       

Hi Hermod

What is it exactly you are trying to do? Why are you trying to override
the default cookie policy? HttpClient 4.0 comes with a new cookie policy
that automatically picks up the best cookie spec for a particular cookie
header. If a cookie conforms to the RFC2965 HttpClient will handle it
according to that spec. If a cookie is an old fashion Netscape style
cookie, HttpClient will use the Netscape policy. If unsure, HttpClient
will use the browser compatibility spec.

There should no longer be any need to tweak the default cookie policy.

> client.getParams().setParameter(ClientContext.COOKIE_STORE, new
> BasicCookieStore());
> 

This is wrong. If you want to provide a custom cookie store, you have to
set it in the execution context. See this example:

http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientCustomContext.java

Anyways, please post a _complete_ code sample that reproduces the
problem. I am not really that good at mind reading. Test cases / wire
logs work better for me.

Oleg 


> Hermod





> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that the DnB NOR Group
> cannot accept any payment orders or other legally binding correspondence with
> customers as a part of an email. 
> 
> This email message has been virus checked by the anti virus programs used
> in the DnB NOR Group.
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to