class AssetRenditionServlet extends SlingSafeMethodsServlet {

    protected void setResponseHeaders(final SlingHttpServletResponse response, final AssetRenditionParameters parameters) {
        if (parameters.isDownload()) {
            response.setHeader("Content-Disposition", String.format("attachment; filename=%s", parameters.getFileName()));
        } else {
            response.setHeader("Content-Disposition", String.format("filename=%s", parameters.getFileName()));
        }
    }

}