>Correct. @lib/http.l has in '*Mime':

>   (`(chop "txt") "text/octet-stream" 1 T)

>".htm" is not in '*Mime'. You can add an entry with 'mime' upon startup
>of your
>program:

>   (mime "htm" "text/html; charset=utf-8")


I did try that but it did not work. The reason i asked :-)

Files: tst.htm and tst.txt are plain text, html and txt files.(*attached in 
this email for easy reproducibility)


#code for tst.l
(mime "htm" "text/html; charset=utf-8")
(mime "txt" "text/plain; charset=utf-8")


This is how i start the server 
$ pil @lib/http.l @lib/xhtml.l --server 9091 tst.l


$ curl -si localhost:9091/tst.txt | grep Content-Type
-> Content-Type: text/octet-stream


$ curl -si localhost:9091/tst.htm | grep Content-Type
-> Content-Type: application/octet-stream
-- 
SuperSaiyan Blue
Title: tst htm extention

Does this work?

This is a text file

Reply via email to