From bd2602b180d1955bc025f4f67a8f581d6eb1fe45 Mon Sep 17 00:00:00 2001 From: Scott Nielsen Date: Thu, 19 Jan 2017 00:34:41 -0700 Subject: [PATCH] wrap-index serves a file instead of slurping it This preserves the encoding in the Content-Type header. --- src/pandeiro/boot_http/impl.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pandeiro/boot_http/impl.clj b/src/pandeiro/boot_http/impl.clj index 28e953c..2d6ff9f 100644 --- a/src/pandeiro/boot_http/impl.clj +++ b/src/pandeiro/boot_http/impl.clj @@ -41,7 +41,7 @@ {:status 200 :headers {"Content-Type" "text/html"} :body (if-let [index-file (index-file-exists? files)] - (slurp index-file) + (io/file index-file) (format (str "" "

Directory listing


" "")