Open lt82654993 opened 5 years ago
问题: CookieStore cookieStore = httpClient.getCookieStore(); 这种形式获取cookie可能会导致cookie信息获取不全,报invalid cookie header httpclient警告提 示; 提示信息如下 o.a.h.c.protocol.ResponseProcessCookies : Invalid cookie header: "Set-Cookie: activityAccountJumpPage=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; domain=kuaishou.com". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:00 GMT
解决方法: Response response = httpClient.execute(httpPost); response.getHeaders("Set-Cookie")[0].getValue();
问题: CookieStore cookieStore = httpClient.getCookieStore(); 这种形式获取cookie可能会导致cookie信息获取不全,报invalid cookie header httpclient警告提 示; 提示信息如下 o.a.h.c.protocol.ResponseProcessCookies : Invalid cookie header: "Set-Cookie: activityAccountJumpPage=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; domain=kuaishou.com". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:00 GMT
解决方法: Response response = httpClient.execute(httpPost); response.getHeaders("Set-Cookie")[0].getValue();