hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Loginov <psw...@gmail.com>
Subject CookiePolicy
Date Wed, 06 Jul 2011 08:09:51 GMT
HttpClient 3.1

class X {
class CookieSP extends CookieSpecBase {
               public boolean domainMatch(String host, String domain) {
                   return true;
               }
 }
           CookiePolicy.registerCookieSpec("ga", CookieSP.class);
           CookieSpec cs = CookiePolicy.getCookieSpec("ga");
           String cp = cs.toString();

           client.getParams().setCookiePolicy(cp);
}
getCookieSpec("ga"); shows an Exception:

ERROR CookiePolicy         [27108604-0] Error initializing cookie spec: ga
java.lang.IllegalAccessException: Class
org.apache.commons.httpclient.cookie.CookiePolicy can not access a member of
class X$1CookieSP with modifiers ""

ps: I'm trying to set the cookie policy, which would accept cookies of
domain independently from it's origin, i.e. set cookie from one domain for
another one.
-- 
Vladimir Loginov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message