code: private static void setContentTypeHeader(HttpResponse response, File file) {
          MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap();
          response.headers().set(HttpHeaderNames.CONTENT_TYPE, mimeTypesMap.getContentType(file.getPath()));
      }
docs: Sets the content type header for the HTTP Response
  
  @param response
  HTTP response
  @param file
  file to extract content type