Ver código fonte

* Now the MIME type can be overridden (if you have a .php file, it is
marked as applicaton/octet-stream when it should be text/plain)

Tyler Akins 24 anos atrás
pai
commit
84cff57c5a
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      src/download.php

+ 4 - 0
src/download.php

@@ -82,6 +82,10 @@
    $charset = $header->charset;
    $type0 = $header->type0;
    $type1 = $header->type1;
+   if (isset($override_type0))
+       $type0 = $override_type0;
+   if (isset($override_type1))
+       $type1 = $override_type1;
    $filename = decodeHeader($header->filename);
 
    if (strlen($filename) < 1) {