11.7

visit mdn to check all mime type

--- tiny.origin.c	2021-02-25 07:26:33.302592754 +0000
+++ tiny.7.c	2021-02-25 07:26:33.302592754 +0000
@@ -173,6 +173,8 @@
     strcpy(filetype, "image/png");
   else if (strstr(filename, ".jpg"))
     strcpy(filetype, "image/jpeg");
+  else if (strstr(filename, ".mpeg"))
+    strcpy(filetype, "video/mpeg");
   else
     strcpy(filetype, "text/plain");
 }

run server

(cd ./site/content/chapter11/code; make && ./tiny.7 5000)

browser visit

http://localhost:5000/ghost-in-shell.mpeg
comments powered by Disqus