From 72db2436c0786cfe6d1fec09bc7650289319c48e Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Fri, 7 Nov 2008 17:21:52 +0000 Subject: [PATCH] Allowing #f for passwords svn: r12342 --- collects/web-server/web-server-unit.ss | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/collects/web-server/web-server-unit.ss b/collects/web-server/web-server-unit.ss index a9fc06229c..e2db4cc00d 100644 --- a/collects/web-server/web-server-unit.ss +++ b/collects/web-server/web-server-unit.ss @@ -57,18 +57,20 @@ (log:make #:format (log:log-format->format (host-log-format host-info)) #:log-path (host-log-path host-info)) (lambda (conn req) (next-dispatcher))) - (let-values ([(update-password-cache! password-check) - (passwords:password-file->authorized? (host-passwords host-info))]) - (sequencer:make - (timeout:make (timeouts-password (host-timeouts host-info))) - (passwords:make - (passwords:make-basic-denied?/path - password-check) - #:authentication-responder (responders-authentication (host-responders host-info))) - (path-procedure:make "/conf/refresh-passwords" - (lambda _ - (update-password-cache!) - ((responders-passwords-refreshed (host-responders host-info))))))) + (if (host-passwords host-info) + (let-values ([(update-password-cache! password-check) + (passwords:password-file->authorized? (host-passwords host-info))]) + (sequencer:make + (timeout:make (timeouts-password (host-timeouts host-info))) + (passwords:make + (passwords:make-basic-denied?/path + password-check) + #:authentication-responder (responders-authentication (host-responders host-info))) + (path-procedure:make "/conf/refresh-passwords" + (lambda _ + (update-password-cache!) + ((responders-passwords-refreshed (host-responders host-info))))))) + (lambda (conn req) (next-dispatcher))) (path-procedure:make "/conf/collect-garbage" (lambda _ (collect-garbage)