// Clean up the cookie headers
removeRequestHeader("cookie");
CookieSpec matcher = CookiePolicy.getSpecByPolicy(state.getCookiePolicy());
Cookie[] cookies = matcher.match(conn.getHost(), conn.getPort(),
getPath(), conn.isSecure(), state.getCookies());
if ((cookies != null) && (cookies.length > 0)) {
if (this.isStrictMode()) {
// In strict mode put all cookies on the same header
getRequestHeaderGroup().addHeader(