unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Haunt serves some resources mistakenly as text/plain
@ 2017-12-16 20:36 sirgazil
  2017-12-21 13:25 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: sirgazil @ 2017-12-16 20:36 UTC (permalink / raw)
  To: guile-user

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/




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-21 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-16 20:36 Haunt serves some resources mistakenly as text/plain sirgazil
2017-12-21 13:25 ` Ludovic Courtès
2017-12-21 13:53   ` Thompson, David

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).