title: CakePHP ignores Content-Type setting on response
body: <p>In my controller action, I have this:</p>
  
  <pre><code>$pdf = $this-&gt;Invoice-&gt;makePdf($invoice);
  $this-&gt;response-&gt;charset('UTF-8');
  $this-&gt;response-&gt;body($pdf);
  $this-&gt;response-&gt;type(array('pdf' =&gt; 'application/x-pdf'));
  $this-&gt;response-&gt;disableCache();
  $this-&gt;response-&gt;send();
  </code></pre>
  
  <p>However, no matter what I do, CakePHP always sends the data as <code>text/html; charset=utf-8</code>. I have also tried</p>
  
  <pre><code>$this-&gt;response-&gt;header(array('Content-Type' =&gt; 'application/x-pdf'));
  </code></pre>
  
  <p>But it still sent it as <code>text/html</code>. How can I force the response to be sent using the content type above?</p>