title: Apache 2.4 + XSendfile appends charset=utf-8 to content-type header
body: <p>We just migrated one of our web applications (classic lamp stack) from Ubuntu 14/Apache 2.2/PHP 5.5 to Ubuntu 16/Apache 2.4/PHP 7.0. Everything worked pretty smooth. There is only one part that is giving me headaches at the moment:</p>
  
  <p>One route in our application checks the incoming file request and delivers that file via XSendfile (third party contents). The content-type for the file delivery is set explicit by the application. This means, for example, we append a content-type of <code>text/html</code> for <code>*.html</code> files. This worked really smooth and the browser received that exact content type.</p>
  
  <p>Now, on the new machine (same code and same files to deliver), the content-type received by the browser is <code>text/html;charset=utf-8</code>. There are some charset metadata appended to the content-type.</p>
  
  <p>This is pretty bad for us, because there are some files containing <code>iso-8859-1</code> encoded contents. The result are encoding errors in the displayed html file.</p>
  
  <p>I have triple checked everything. The content-type we are placing in the HTTP headers are explicitly set <strong>without</strong> the utf-8 charset metadata.</p>
  
  <p>Right now I am checking various Apache2/XSendfile specific configurations for any hints about that behaviour.</p>
  
  <p>Has anybody else experienced similar behaviour on Apache 2.4 using XSendfile? Is it right, that the content-type sent by Apache has a higher importance than the one in the html meta tag? How can I disable automatic appending of charset meta infos in the content-type header?</p>