serve: web-server: Fix directory rendering.

Paths were not being concatenated properly.

* haunt/server/web-server.scm (render-directory): Fix concat+uri-encode.
This commit is contained in:
David Thompson 2015-04-11 23:30:59 -04:00
parent 06321fbdd8
commit 390980cf5c
1 changed files with 2 additions and 2 deletions

View File

@ -35,6 +35,7 @@
#:use-module (web request)
#:use-module (web response)
#:use-module (web uri)
#:use-module (haunt utils)
#:use-module (haunt serve mime-types)
#:export (serve))
@ -111,8 +112,7 @@ FILE-NAME."
"Concatenate FILE-NAMES, preserving the correct file separators."
(string-join (map uri-encode
(remove string-null?
(string-split (string-concatenate file-names)
#\/)))
(flat-map (cut string-split <> #\/) file-names)))
"/" 'prefix))
(define render-child