code: public void resolveContentType(FileRequestContext context) {
      String contentType = lookupMimeType(context.file.getName());
      if(contentType != null) {
        context.contentType = contentType;
        if(contentType.equals("text/html")) {
          context.contentType += ";charset=UTF-8";
        }
      }
    }
docs: Looks up the mime type based on file extension and if found sets it on the FileRequestContext.
  
  @param context