From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: sirgazil Newsgroups: gmane.lisp.guile.user Subject: Haunt serves some resources mistakenly as text/plain Date: Sat, 16 Dec 2017 15:36:21 -0500 Message-ID: <7618df95-aba7-2e5b-6bb2-e6d6de427907@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1513484532 15236 195.159.176.226 (17 Dec 2017 04:22:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Dec 2017 04:22:12 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Dec 17 05:22:08 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQQSl-0003Yv-Dx for guile-user@m.gmane.org; Sun, 17 Dec 2017 05:22:07 +0100 Original-Received: from localhost ([::1]:53040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQQUi-000727-1a for guile-user@m.gmane.org; Sat, 16 Dec 2017 23:24:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQQUH-00071z-SK for guile-user@gnu.org; Sat, 16 Dec 2017 23:23:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQQUF-0004P4-S0 for guile-user@gnu.org; Sat, 16 Dec 2017 23:23:41 -0500 Original-Received: from sender-pp-092.zoho.com ([135.84.80.237]:25420) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eQQUF-0004O0-JR for guile-user@gnu.org; Sat, 16 Dec 2017 23:23:39 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=to:cc:from:subject:message-id:date:user-agent:mime-version:content-type; b=Dw3XKn7evrAx203cpa4H8taQQCUjEb8uASbyyw5S6yMEo8I8cFSHtcGE3rZFJ+ufyy9BAmC9np67 AVWgXO5BkSaLYJBArQ1R8vCEavLRlQ8+aRPc8hRZygQF8fCXVD+t Original-Received: from [192.168.1.51] (190.251.129.76 [190.251.129.76]) by mx.zohomail.com with SMTPS id 1513456584199125.42726956273418; Sat, 16 Dec 2017 12:36:24 -0800 (PST) Content-Language: en-US X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 135.84.80.237 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14376 Archived-At: 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/