]> git.plutz.net Git - serve0/commitdiff
implement mp4 file type faking
authorPaul Hänsch <paul@plutz.net>
Sun, 22 Jul 2018 13:32:13 +0000 (15:32 +0200)
committerPaul Hänsch <paul@plutz.net>
Sun, 22 Jul 2018 13:32:13 +0000 (15:32 +0200)
index.cgi

index 8359b637af1be01f3d67aaecb0ef67f958443938..8f21c83c296f8e077fa38a92ddf7d1c1407c858a 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -56,7 +56,8 @@ elif [ -f "$_DATA/$ITEM" ]; then
     delete)
     ;;
     *) . "$_EXEC/cgilite/file.sh"
-      FILE "$_DATA/$ITEM"
+      fakemp4="$(COOKIE fakemp4)"
+      FILE "$_DATA/$ITEM" "$([ "$fakemp4" = yes ] && printf 'video/mp4')"
     ;;
   esac
 elif [ -d "$_DATA/$ITEM" ]; then