Java org.apache.commons.httpclient.HttpMethodBase processCookieHeaders Cookie rejected: host minus domain may not contain any dots

org.apache.commons.httpclient.HttpMethodBase processCookieHeaders
警告: Cookie rejected: "$Version=0; OAMAuthnHintCookie=1; $Path=/; $Domain=.mytest.com". Domain attribute ".mytest.com" violates RFC 2109: host minus domain may not contain any dots

 

 

解决办法:

 

client = new HttpClient();
 

//增加下面两行即可
client.getParams().setParameter("http.protocol.single-cookie-header", true);
client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);

posted @ 2020-08-04 19:55  我有目标  阅读(543)  评论(0编辑  收藏  举报