Hi Dave, Guile,
I found this bug about a year ago, but I don't think I can fix it
myself, so I'm posting this here hoping that David or Haunt users can
check if they can reproduce the error, and maybe patch Haunt.
When you create resources in Haunt whose URL paths contain dots beside
the dot before a file extension, it seems Haunt's web server will always
serve them as "text/plain". So, in the case of HTML pages, for example,
when you visit them in the Web browser, the browser won't render the
HTML, but display the HTML markup instead (within a PRE element in a
browser-generated HTML page).
Steps to reproduce:
1. Download a test directory
(https://bitbucket.org/sirgazil/dnd/downloads/haunt-dots-site.tar.gz).
It contains two test pages:
haunt-dots-site
├── hello.es.html
└── hello.html
2. Open a REPL and serve the contents of that directory:
$ guile
scheme@(guile-user)> (use-modules (haunt serve web-server))
scheme@(guile-user)> (serve "/path/to/haunt-dots-site")
You shouldn't see any output here, but the server is running.
3. Visit http://localhost:8080/hello.html. You should see a page
displaying the text "Hello Haunt!".
4. Visit http://localhost:8080/hello.es.html. You see the HTML code
instead of the expected message "¡Hola Haunt!".
--
https://sirgazil.bitbucket.io/