134135136137138139140141142143144
response.setHeader(header); } else { Header header = new Header(HttpConstants.HEADER_TRANSFER_ENCODING, "chunked"); response.addHeader(header); } } else { Header header = new Header(HttpConstants.HEADER_CONTENT_LENGTH, Long.toString(len));
146147148149150151152153154155156
} } else { Header header = new Header(HttpConstants.HEADER_CONTENT_LENGTH, "0"); response.addHeader(header); } } // See if the the client explicitly handles connection persistence String connHeader = msg.getOutboundProperty(HttpConstants.HEADER_CONNECTION);
262263264265266267268269270271272
continue; } if (!(cookiesObject instanceof Cookie[])) { response.addHeader(new Header(headerName, cookiesObject.toString())); } else { Cookie[] arrayOfCookies = CookieHelper.asArrayOfCookies(cookiesObject); for (Cookie cookie : arrayOfCookies)
269270271272273274275276277278279
else { Cookie[] arrayOfCookies = CookieHelper.asArrayOfCookies(cookiesObject); for (Cookie cookie : arrayOfCookies) { response.addHeader(new Header(headerName, CookieHelper.formatCookieForASetCookieHeader(cookie))); } } } else