Return-Path: Delivered-To: apmail-jakarta-httpcomponents-dev-archive@www.apache.org Received: (qmail 34940 invoked from network); 30 Aug 2007 07:46:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2007 07:46:03 -0000 Received: (qmail 21785 invoked by uid 500); 30 Aug 2007 07:45:58 -0000 Delivered-To: apmail-jakarta-httpcomponents-dev-archive@jakarta.apache.org Received: (qmail 21761 invoked by uid 500); 30 Aug 2007 07:45:58 -0000 Mailing-List: contact httpcomponents-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list httpcomponents-dev@jakarta.apache.org Received: (qmail 21752 invoked by uid 99); 30 Aug 2007 07:45:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 00:45:58 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of odi@odi.ch designates 62.65.128.36 as permitted sender) Received: from [62.65.128.36] (HELO smtp.2wire.ch) (62.65.128.36) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 07:46:49 +0000 Received: from gollum.odi.ch (gw.ptr-80-238-227-223.customer.ch.netstream.com [80.238.227.223]) by smtp.2wire.ch (Postfix) with ESMTP id B08E73E1F3 for ; Thu, 30 Aug 2007 09:33:17 +0200 (CEST) Received: from [10.11.1.222] (cvs.logobject.ch [81.7.230.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gollum.odi.ch (Postfix) with ESMTP id 39394AEE7 for ; Thu, 30 Aug 2007 09:45:27 +0200 (CEST) Message-ID: <46D6759E.2040101@odi.ch> Date: Thu, 30 Aug 2007 09:45:34 +0200 From: =?ISO-8859-1?Q?Ortwin_Gl=FCck?= User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: HttpComponents Project Subject: Re: [httpclient] Setting default CookiePolicy References: In-Reply-To: X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Keith, HttpClient does not support "system wide" configuration through static variables or system properties or similar. The main reason is that such static configuration is unsuitable in complex systems where the same library may be used by different applications or subsystems. Also the boundary of "system wide" is not well-defined: while system properties apply to the whole VM, static variables are local to the classloader. And there are also problems when security managers are in place (e.g. in Browser Applets). All in all it would lead to not well-defined behaviour. The caller knows best how to configure HttpClient, so he is fully responsible for it. Of course that makes it harder to fix problems in code that is not under your control. All you can do is work together with the author of that code. Cheers Ortwin keith chapman wrote: > Hi, > > Is there a way so set a default cookie policy in HTTPClient. I tried > CookiePolicy.setDefaultPolicy(CookiePolicy.COMPATIBILITY) but it didn't > work. (This is deprecated, also it does not work). What I need to is get rid > of the following messages (I cannot change this property on a per request > basis on the httpMethod itself). I know that > httpmethod.getParams.setCookiePolicy works (I want to do it system wide by > setting the property once) > . Is there a workaround? I had a look at > http://jakarta.apache.org/commons/httpclient/cookies.html too. > > WARN [2007-08-02 08:19:38,513] Cookie rejected: "$Version=0; > cookie_l10n=en-us > %3Bus; $Path=/; $Domain=flickr.com". Domain attribute " flickr.com" violates > RFC > 2109: domain must start with a dot > > WARN [2007-08-02 08:19:38,515] Cookie rejected: "$Version=0; > cookie_intl=delet > ed; $Path=/; $Domain=flickr.com ". Domain attribute "flickr.com" violates > RFC 210 > 9: domain must start with a dot > > Thanks, > Keith > -- [web] http://www.odi.ch/ [blog] http://www.odi.ch/weblog/ [pgp] key 0x81CF3416 finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416 --------------------------------------------------------------------- To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org