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