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 ) ; } }
Checks whether the given request should be closed or not once completed .