if (out.containsHeader("Pragma")) { log.debug("Removing Pragma header to avoid caching issues in IE"); out.setHeader("Pragma",null); } if (out.containsHeader("Cache-Control")) { log.debug("Removing Cache-Control header to avoid caching issues in IE"); out.setHeader("Cache-Control",null); }
ServletUtils.removeCacheHeaders(out);
    public static void sendNewB64Cert(byte[] b64cert, HttpServletResponse out, String beginKey, String endKey)        throws Exception {        if (b64cert.length == 0) {            log.error("0 length certificate can not be sent to client!");            return;        }        if (out.containsHeader("Pragma")) {            log.debug("Removing Pragma header to avoid caching issues in IE");            out.setHeader("Pragma",null);        }        if (out.containsHeader("Cache-Control")) {            log.debug("Removing Cache-Control header to avoid caching issues in IE");            out.setHeader("Cache-Control",null);        }        // Set content-type to general file        out.setContentType("application/octet-stream");                out.setHeader("Content-disposition", "filename=cert.pem");        out.setContentLength(b64cert.length + beginKey.length() + endKey.length());        // Write the certificate        ServletOutputStream os = out.getOutputStream();        os.write(beginKey.getBytes());        os.write(b64cert);        os.write(endKey.getBytes());        out.flushBuffer();        log.debug("Sent reply to client");        log.debug(new String(b64cert));    } // sendNewB64Cert