code: private void setContentTypeHeader(HttpResponse response, URLConnection resUrlConnection) {
      MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap();
      String resName = resUrlConnection.getURL().getFile();
      response.headers().set(HttpHeaderNames.CONTENT_TYPE, mimeTypesMap.getContentType(resName));
    }
docs: Sets the content type header for the HTTP Response
  
  @param response
  HTTP response