title: Open/Save as... dialog box not showing
body: <p>I have a PDF file on my server that I need the user to download from the client side.</p>
  
  <p>Using Spring Framework, I use javax.servlet.http.HttpServletResponse to create the correct response and corresponding header:</p>
  
  <pre><code>response.setHeader("Expires", "-1");
  response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
  response.setHeader("Pragma", "public");
  response.setContentType("application/pdf");
  response.setHeader("Content-Disposition", "attachment;filename="content.pdf");
  response.setContentLength(content.size());
  </code></pre>
  
  <p>Then I use the ServletOutputStream to write the content:</p>
  
  <pre><code>ServletOutputStream os;
  try {
      os = response.getOutputStream();
      os.write(((ByteArrayOutputStream)baos).toByteArray());
      baos.close();
      os.flush();
      os.close();
  } catch (IOException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
  }
  </code></pre>
  
  <p>On the client side, I receive HTTP code 200 and receive the correct response body, with the PDF file, but the 'Save As...' pop-up did not appear.</p>
  
  <p>Is there any reason on the Header configuration that could lead to this problem or could it be somewhere else?</p>
  
  <p>Thank you.</p>