http://llying.iteye.com/blog/474027
最近使用HttpClient4的时候出现如下警告信息
org.apache.http.client.protocol.ResponseProcessCOOKIEs processCOOKIEs
警告: Invalid COOKIE header: "set-COOKIE: ld=ApO1Byllll23mj1xlllll9$cay9lllllT$PxWyllll9lllllVklll5@@@@@@@@@@; path=/; expires=Thu, 22 Oct 2009 01:48:49 GMT; domain=.shanhe114.com". Unable to parse expires attribute: Thu, 22 Oct 2009 01:48:49 GMT
找了很久终于找到解决办法,实际很简单 就是加上这样一句代码
- HttpClient httpClient = new DefaultHttpClient();
- HttpClientParams.setCOOKIEPolicy(httpClient.getParams(), COOKIEPolicy.BROWSER_COMPATIBILITY);