HttpClient3.1 警告: Cookie rejected:

四月 16, 2015 5:26:41 下午 org.apache.commons.httpclient.HttpMethodBase processCookieHeaders
警告: Cookie rejected: "$Version="1"; BAIDUID="1E6B32311ACAB688169606EB8862CD69:FG=1"; $Path="/"; $Domain=".baidu.com"". Domain attribute ".baidu.com" violates RFC 2109: host minus domain may not contain any dots
四月 16, 2015 5:26:42 下午 org.apache.commons.httpclient.HttpMethodBase processCookieHeaders
警告: Cookie rejected: "$Version="1"; BAIDUID="46FC824C23445D3A6D43C0BD8D5414DB:FG=1"; $Path="/"; $Domain=".baidu.com"". Domain attribute ".baidu.com" violates RFC 2109: host minus domain may not contain any dots

设置以下内容,就可以:

        DefaultHttpParams.getDefaultParams().setParameter("http.protocol.cookie-policy", CookiePolicy.BROWSER_COMPATIBILITY);
        

 

posted @ 2015-04-16 17:29  yshy  阅读(1618)  评论(0编辑  收藏  举报