how to accept all cookies ?

2004-07-21 Thread Mathias Cianci
Hello everybody, When I'm sending requests to Yahoo search engine, I get this type of warning message : 21 juil. 2004 09:56:32 org.apache.commons.httpclient.HttpMethodBase processResponseHeaders ATTENTION: Cookie rejected: $Version=0; B=deli0110fs8drb=2; $Domain=.yahoo.com; $Path=/. Domain

Re: how to accept all cookies ?

2004-07-21 Thread Mathias Cianci
Thank you for this answer, but I've already seen that :-( Here's a part of my source code : System.getProperties().setProperty(httpclient.useragent, Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)); System.setProperty(httpclient.cookiespec, COMPATIBILITY); HttpClient client =

RE: how to accept all cookies ?

2004-07-21 Thread Kalnichevski, Oleg
Replace System.setProperty(httpclient.cookiespec, COMPATIBILITY); with HttpClient client = new HttpClient(); client.getState().setCookiePolicy(CookiePolicy.COMPATIBILITY); and see if that makes any difference. Oleg -Original Message- From: Mathias Cianci [mailto:[EMAIL

Re: how to accept all cookies ?

2004-07-21 Thread Mathias Cianci
Thank you Oleg, now it works ! But I still have another cookie problem :-( Altavista have recently been acquired by Yahoo corp. When you make requests in atltavista.com, you're now transparently redirected to yahoo.com (whitch puts a cookie for the domain altavista.com), and then again to

RE: how to accept all cookies ?

2004-07-21 Thread Kalnichevski, Oleg
Mathias, I know it is of little comfort to you but the cookie clearly violates even the most loosely defines HTTP security policies. At least the site seems to send the invalid cookie to MSIE (or any agent identifying itself as MSIE) only I see three possibilities to solve the problem (1) I

Re: how to accept all cookies ?

2004-07-21 Thread Elijah Baley
Here is how I did it: 1. derive your own method from the one you want to use - e.g.: class MyGetMethod extends GetMethod { .. constructors... protected void processResponseHeaders (HttpState state, HttpConnection conn) { final HeaderGroup hg=getResponseHeaderGroup();

Re: how to accept all cookies ?

2004-07-21 Thread Mathias Cianci
Thank you, now it works ! I only had to make a new constructor for MyGetMethod public MyGetMethod(String uri) { super(uri); setFollowRedirects(true); } Have a nice day ! Elijah Baley a écrit : Here is how I did it: 1. derive your own method from the one you want