code: private static boolean isHEADRequest(ContentManagerParams params) {
          Context context = params.getContext();
          if (context != null) {
              String method =
                      context.getEnvironmentValue(
                              Constants.HTTP_REQUEST.METHOD.attributeId);
              return "HEAD".equalsIgnoreCase(method);
          }
          return false;
      }
docs: determine whether the context is a HEAD http request