From: sirgazil <sirgazil@zoho.com>
To: guile-user@gnu.org
Subject: Haunt serves some resources mistakenly as text/plain
Date: Sat, 16 Dec 2017 15:36:21 -0500 [thread overview]
Message-ID: <7618df95-aba7-2e5b-6bb2-e6d6de427907@zoho.com> (raw)
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/
next reply other threads:[~2017-12-16 20:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-16 20:36 sirgazil [this message]
2017-12-21 13:25 ` Haunt serves some resources mistakenly as text/plain Ludovic Courtès
2017-12-21 13:53 ` Thompson, David
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7618df95-aba7-2e5b-6bb2-e6d6de427907@zoho.com \
--to=sirgazil@zoho.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).