title: Firefox downloads retrieve.php instead of filename given per Content-Disposition header
body: <p>I have a PHP script called retrieve.php that compresses uploaded files from a directory in to a .zip file and then outputs them to the stream, so said file can be downloaded.</p>
  
  <p>The script works in all browsers except Firefox.
  After searching online for quite a while now and coming across this question: <a href="https://stackoverflow.com/questions/25226197/php-download-script-returns-download-file-php-instead-of-filename">PHP download script returns download-file.php instead of filename</a> and still having the same issue, I'm stumped and have no clue what's going wrong.</p>
  
  <p>This is the code being used to download the file:</p>
  
  <pre><code>if ($zippedElements &gt;= 1) {
  //      die($zipFilename);
          $zipFilename = "download-".time().".zip";
          // Send zip to recipient
          header("Content-Dispositon: attachment; filename=\"$zipFilename\"");
          header("Content-Length: ".filesize($zipFileName));
          header("Content-Type: application/zip");
          header("Content-Transfer-Encoding: binary");
          header("Connection: Keep-Alive");
          header("Expires: 0");
          header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
          header("Pragma: public");
          header("Accept-Ranges: bytes");
          readfile($zipFileName);
  
      } else return;
  </code></pre>
  
  <p>I've tried setting the header to different values, such as content-type: application/force-download, adding the asterisk (*) after filename, etc., but all to no avail.</p>
  
  <p>The result in Firefox looks as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/rEBJa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rEBJa.png" alt="enter image description here"></a></p>
  
  <p>Any help with the matter would be much appreciated.</p>