public static void setContentLength(HttpMessage message, long contentLength) { message.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(contentLength)); }
public static boolean isKeepAlive(HttpMessage message) { return HttpHeaders.isKeepAlive(message) && message.getProtocolVersion().equals(HttpVersion.HTTP_1_1); }