Hi list! I have some .htm and .txt files and wish to serve them via the picolisp webserver. Unfortunately, the mime function doesn't work the way I want it to work. The files aren't getting sent as 'text/html' or 'text/plain' for htm and txt respectively.
Curl says the files are sent as octet-steam, for both. Thoughts? #tst.txt, header response Content-Type: text/octet-stream Content-Disposition: attachment; filename="tst.txt" #tst.htm, header response Content-Type: application/octet-stream Content-Disposition: attachment; filename="tst.htm" #server start $ pil @lib/http.l @lib/xhtml.l --server 9090 tst.l #Source code for tst.l (mime "htm" "text/html; charset=utf-8" ) (mime "txt" "text/plain; chsrset=utf-8" ) (html 0 "mime tst" "@lib.css" () (<h1> () "Header level 1") (<p> () "Text and htm files local") (<href> "tst.txt" "http://localhost:9090/tst.txt") (<br>) (<href> "tst.htm" "http://localhost:9090/tst.htm") ) #code ends here -- SuperSaiyan Blue -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
