diff options
Diffstat (limited to 'pdf-as-web')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java | 7 |
1 files changed, 7 insertions, 0 deletions
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 031eeac2..96d02f16 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 @@ -26,6 +26,8 @@ package at.gv.egiz.pdfas.web.servlets; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.Iterator; import java.util.List; import java.util.zip.Deflater; @@ -236,6 +238,11 @@ public class PDFData extends HttpServlet { } response.setHeader("Content-Disposition", "inline;filename=\"" + PdfAsHelper.getPDFFileName(request) + "\""); + + response.setHeader("X-FILENAME-BASE64URL", + Base64.getUrlEncoder().encodeToString( + PdfAsHelper.getPDFFileName(request).getBytes(StandardCharsets.UTF_8))); + final String pdfCert = signedFile.getSignerCertificate(); if (pdfCert != null) { response.setHeader("Signer-Certificate", pdfCert); |