code: protected boolean checkAccepts(FileRequestContext context) throws IOException {
      if (!canAccept(context.request.getHeader(ACCEPT_HEADER), false, context.contentType)) {
        notAcceptable(context);
        return true;
      }
      
      if (!(canAccept(context.request.getHeader(ACCEPT_ENCODING_HEADER), false, "identity") || canAccept(context.request.getHeader(ACCEPT_ENCODING_HEADER), false, "gzip"))) {
        notAcceptable(context);
        return true;
      }
      
      if (context.request.getHeader(ACCEPT_ENCODING_HEADER) != null && canAccept(context.request.getHeader(ACCEPT_ENCODING_HEADER), true, "gzip") && shouldGzip(context.contentType)) {
        context.compress = true;
      }
      return false;
    }
docs: Checks the accepts headers and makes sure that we can fulfill the request.
  @param context
  @return
  @throws IOException