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-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to