hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: accepting cookies for another domain
Date Thu, 26 Feb 2009 20:15:52 GMT
Raphael Bauduin wrote:
> Hi,
> 
> I'm using the delicious-java lib, which is itself using HttpClient.
> 
> I'm getting an error because the cookie set is for domain
> delicious.com, but requests are sent to api.del.icio.us:
> 
> org.apache.commons.httpclient.HttpMethodBase processResponseHeaders
> WARNING: Cookie rejected: "delicious_us_production=...... Illegal
> domain attribute ".delicious.com". Domain of origin: "api.del.icio.us"
> 
> I have identified with object I should modify, but I don't know which
> policy to use, so I triest all of them, without success (with the 3.0
> release). I tried the 3.1 release with BROWSER_COMPATIBILITY policy,
> which fails, and the 4.0 beta doeesn't work with the delicious lib.
> 
> Here's the line I'm changing (I'm sure this is the place to change the
> code as when I ignore the cookies here, I don't get the error message)
> httpClientParams.setCookiePolicy(org.apache.commons.httpclient.cookie.CookiePolicy.???);
> 
> Is it at all possible to accept cookies for another domain with httpclient?
> 

Yes, but you will have to implement a custom CookieSpec for that.

Oleg

> Thanks in advance for your help
> 
> Raphaƫl
> 
> 


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


Mime
View raw message