]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
send_local_file: add application/octet-stream hack
[tt-rss.git] / include / functions.php
index 7ebbe38b38b447137fad23c2cce88290e851b04f..b6e49716cd88ee710ede90a9fb835fb996f35761 100755 (executable)
                        }
 
                        $mimetype = mime_content_type($filename);
+
+                       // this is hardly ideal but 1) only media is cached in images/ and 2) seemingly only mp4
+                       // video files are detected as octet-stream by mime_content_type()
+
+                       if ($mimetype == "application/octet-stream")
+                               $mimetype = "video/mp4";
+
                        header("Content-type: $mimetype");
 
                        $stamp = gmdate("D, d M Y H:i:s", filemtime($filename)) . " GMT";