From 9bbf48d0846b19c2ac545277fa7b25f1cec1ec36 Mon Sep 17 00:00:00 2001 From: Kris Katterjohn Date: Tue, 1 Oct 2019 20:00:36 -0500 Subject: [PATCH] (chibi net server-util): file-mime-type: fix load-mime-types call Use find instead of any so load-mime-types will get the filename instead of #t when a mime.types file is found. Otherwise an error occurs in load-mime-types. --- lib/chibi/net/server-util.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/chibi/net/server-util.scm b/lib/chibi/net/server-util.scm index 0d8de8a8..8ee53f4f 100644 --- a/lib/chibi/net/server-util.scm +++ b/lib/chibi/net/server-util.scm @@ -75,9 +75,9 @@ (if (not ext-types) (let ((ht (make-hash-table eq?))) (cond - ((any file-exists? '("/etc/mime.types" - "/etc/httpd/mime.types" - "/etc/apache2/mime.types")) + ((find file-exists? '("/etc/mime.types" + "/etc/httpd/mime.types" + "/etc/apache2/mime.types")) => (lambda (file) (load-mime-types ht file)))) (set! ext-types ht))) (let* ((ext (path-extension file))