code: private boolean isNotModified(HttpRequest request, long lastModified) throws ParseException {
      String ifModifiedSince = request.headers().get(HttpHeaderNames.IF_MODIFIED_SINCE);
      if (ifModifiedSince != null && !ifModifiedSince.equals("")) {
        SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US);
        Date ifModifiedSinceDate = dateFormatter.parse(ifModifiedSince);
  
        // Only compare up to the second because the datetime format we send to the client does
        // not have milliseconds
        long ifModifiedSinceDateSeconds = ifModifiedSinceDate.getTime() / 1000;
        long fileLastModifiedSeconds = lastModified / 1000;
        return ifModifiedSinceDateSeconds == fileLastModifiedSeconds;
      }
      return false;
    }
docs: /*
  Checks if the content has been modified sicne the date provided by the IF_MODIFIED_SINCE http header