serve: Fix 'file-extension' so that the right MIME type is chosen.
authorLudovic Courtès <ludo@gnu.org>
Thu, 21 Dec 2017 13:16:14 +0000 (14:16 +0100)
committerDavid Thompson <dthompson@vistahigherlearning.com>
Thu, 21 Dec 2017 13:51:02 +0000 (08:51 -0500)
commite7b1b290b11c4f2c89999fc079278e917f65bca9
treeb41942a69a67e9f8c4d9005eb6329fa5186a57e5
parent4bf24d36f6faf09cdf8eccb05ad9bd7dda81393f
serve: Fix 'file-extension' so that the right MIME type is chosen.

Reported by sirgazil at
<https://lists.gnu.org/archive/html/guile-user/2017-12/msg00070.html>.

* haunt/serve/mime-types.scm (%file-ext-regexp): Remove.
(file-extension): Rewrite using 'string-rindex'.
haunt/serve/mime-types.scm