From d3ac6e39d94855329a9a6be30ee6b96fd83979d2 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 29 Jun 2023 16:30:59 +0200 Subject: fix(core): set valid encoded 'Content-Disposition' header in provide-signed-PDF servlet --- pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web') diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java index 4e613ed4..031eeac2 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java @@ -145,7 +145,7 @@ public class PDFData extends HttpServlet { } // build response - response.setHeader("Content-Disposition", "inline;filename=multiple_documents.zip"); + response.setHeader("Content-Disposition", "inline;filename=\"multiple_documents.zip\""); response.setContentType("application/zip"); final OutputStream os = response.getOutputStream(); @@ -234,8 +234,8 @@ public class PDFData extends HttpServlet { return; } } - response.setHeader("Content-Disposition", "inline;filename=" - + PdfAsHelper.getPDFFileName(request)); + response.setHeader("Content-Disposition", "inline;filename=\"" + + PdfAsHelper.getPDFFileName(request) + "\""); final String pdfCert = signedFile.getSignerCertificate(); if (pdfCert != null) { response.setHeader("Signer-Certificate", pdfCert); -- cgit v1.2.3