code: private static boolean isConnectionUpgrade(HttpMethod method) {
          Header connectionHeader = method.getRequestHeader("connection");
          if (connectionHeader == null) {
              return false;
          }
          return connectionHeader.getValue().toLowerCase(Locale.ROOT).contains("upgrade");
      }
docs: Tells whether or not the given {@code method} has a {@code Connection} request header with {@code Upgrade} value.
  
  @param method the method that will be checked
  @return {@code true} if the {@code method} has a connection upgrade, {@code false} otherwise