title: PHP serving file download, gives .PHP filename when downloading from Safari
body: <p>I have a php page that is serving files when visited using the XSENDFile module. It works great in most browsers, but in the latest Safari browser the file downloads. And the filesize checks out just fine, however the filename of the file is the name of the php page rather than the proper filename. </p>
  
  <pre><code>$fakename = 'filename';
      $extension = fileexten($filename);
              $mime = contenttype($extension);
              header("Content-Type:".$mime);
              header("X-Sendfile: $filename");
              header('Content-Disposition: attachment; filename="' . $fakename . '.'.$extension);
  </code></pre>
  
  <p>Any ideas? Also I can post more code if need be. </p>