code: public static boolean isKeepAlive(HttpServerRequest request) {
          String connection = request.headers().get(HeaderNames.CONNECTION);
          if (connection != null && connection.equalsIgnoreCase(CLOSE)) {
              return false;
          }
          if (request.version() == HttpVersion.HTTP_1_1) {
              return !CLOSE.equalsIgnoreCase(connection);
          } else {
              return KEEP_ALIVE.equalsIgnoreCase(connection);
          }
      }
docs: Checks whether the given request should be closed or not once completed.
  
  @param request the request
  @return {@code true} if the connection is marked as {@literal keep-alive}, and so must not be closed. {@code
  false} otherwise. Notice that if not set in the request, the default value depends on the HTTP version.