code: private void setContentTypeHeader(final HttpResponse response, final URLConnection connection) {
      response.headers().set(CONTENT_TYPE, mimeTypesMap.getContentType(connection.getURL().getPath()));
    }
docs: Sets the content type header for the HTTP Response
  
  @param response HTTP response
  @param connection connection to extract content type