comparison flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java @ 5607:6e0d122904f9

Explicitly set the content type for the pdf download. This should make the mimetype detection of browsers more robust
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 09 Apr 2013 11:53:47 +0200
parents 0d8564196d73
children 6602be8ca685
comparison
equal deleted inserted replaced
5606:0d8564196d73 5607:6e0d122904f9
394 try { 394 try {
395 byte [] buf = new byte[4096]; 395 byte [] buf = new byte[4096];
396 int r; 396 int r;
397 resp.setHeader("Content-Disposition", 397 resp.setHeader("Content-Disposition",
398 "attachment;filename=flys-karte.pdf"); 398 "attachment;filename=flys-karte.pdf");
399 resp.setContentType("application/pdf");
399 while ((r = in.read(buf)) >= 0) { 400 while ((r = in.read(buf)) >= 0) {
400 out.write(buf, 0, r); 401 out.write(buf, 0, r);
401 } 402 }
402 out.flush(); 403 out.flush();
403 } 404 }

http://dive4elements.wald.intevation.org