summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-04-11 23:30:59 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-04-11 23:30:59 -0400
commit390980cf5ce1d83c52d16098417267ee92f2f6bf (patch)
treecc4bfd0314c3a4d4ec9848cd07714dcc9c1c4f7f
parent06321fbdd8ee13aba3ac1a058cfa56efad56b287 (diff)
serve: web-server: Fix directory rendering.
Paths were not being concatenated properly. * haunt/server/web-server.scm (render-directory): Fix concat+uri-encode.
-rw-r--r--haunt/serve/web-server.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/haunt/serve/web-server.scm b/haunt/serve/web-server.scm
index f66046c..53ccc10 100644
--- a/haunt/serve/web-server.scm
+++ b/haunt/serve/web-server.scm
@@ -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