[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Haunt serves some resources mistakenly as text/plain

From: sirgazil
Subject: Haunt serves some resources mistakenly as text/plain
Date: Sat, 16 Dec 2017 15:36:21 -0500
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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 ( It contains two test pages:

    └── 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/ You see the HTML code instead of the expected message "¡Hola Haunt!".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]