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 PROTECTED] Sent: Wednesday, July 21, 2004 10:19 To: Commons HttpClient Project Subject: Re: how to accept all cookies ? 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 = new HttpClient(); HttpMethod method = new GetMethod(adresse); method.setRequestHeader("Accept-Language","fr"); method.setRequestHeader("Accept-Charset", "UTF-8"); Mathias Kalnichevski, Oleg a écrit : >Mathias, > >Try using the browser compatibility cookie policy. For details please refer to the >HttpClient cookie guide: > >http://jakarta.apache.org/commons/httpclient/cookies.html > >Oleg > > > >-----Original Message----- >From: Mathias Cianci [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 21, 2004 9:58 >To: [EMAIL PROTECTED] >Subject: how to accept all cookies ? > > >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=deli0110fs8dr&b=2; > >$Domain=.yahoo.com; $Path=/". Domain attribute ".yahoo.com" violates RFC > >2109: host minus domain may not contain any dots > > >Does someone know how I can accept every cookie I receive, even if they > >are not completly respect the official specifications ? > >Thank you for advance > >Mathias > > > > >*************************************************************************************************** >The information in this email is confidential and may be legally privileged. Access >to this email by anyone other than the intended addressee is unauthorized. If you >are not the intended recipient of this message, any review, disclosure, copying, >distribution, retention, or any action taken or omitted to be taken in reliance on it >is prohibited and may be unlawful. If you are not the intended recipient, please >reply to or forward a copy of this message to the sender and delete the message, any >attachments, and any copies thereof from your system. >*************************************************************************************************** > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > *************************************************************************************************** The information in this email is confidential and may be legally privileged. Access to this email by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system. *************************************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]