code: public Long getKeepAliveTimeoutSeconds() {
          String keepAliveHeader = nettyResponse.headers().get(KEEP_ALIVE_HEADER_NAME);
          if (null != keepAliveHeader && !keepAliveHeader.isEmpty()) {
              String[] pairs = PATTERN_COMMA.split(keepAliveHeader);
              if (pairs != null) {
                  for (String pair: pairs) {
                      String[] nameValue = PATTERN_EQUALS.split(pair.trim());
                      if (nameValue != null && nameValue.length >= 2) {
                          String name = nameValue[0].trim().toLowerCase();
                          String value = nameValue[1].trim();
                          if (KEEP_ALIVE_TIMEOUT_HEADER_ATTR.equals(name)) {
                              try {
                                  return Long.valueOf(value);
                              } catch (NumberFormatException e) {
                                  logger.info("Invalid HTTP keep alive timeout value. Keep alive header: "
                                              + keepAliveHeader + ", timeout attribute value: " + nameValue[1], e);
                                  return null;
                              }
                          }
                      }
                  }
              }
          }
          return null;
      }
docs: Parses the timeout value from the HTTP keep alive header (with name {@link #KEEP_ALIVE_HEADER_NAME}) as described in
  <a href="http://tools.ietf.org/id/draft-thomson-hybi-http-timeout-01.html">this spec</a>
  
  @return The keep alive timeout or {@code null} if this response does not define the appropriate header value.