code: private static void setContentTypeHeader(HttpResponse response, File file) {
          String contentType = StringKit.mimeType(file.getName());
          if (null == contentType) {
              contentType = URLConnection.guessContentTypeFromName(file.getName());
          }
          response.headers().set(HttpConst.CONTENT_TYPE, contentType);
      }
docs: Sets the content type header for the HTTP Response
  
  @param response HTTP response
  @param file     file to extract content type