diff --git a/collects/web-server/prototype-web-server/dispatch-servlets2.ss b/collects/web-server/prototype-web-server/dispatch-servlets2.ss index 82acacf692..59866fcd00 100644 --- a/collects/web-server/prototype-web-server/dispatch-servlets2.ss +++ b/collects/web-server/prototype-web-server/dispatch-servlets2.ss @@ -56,7 +56,7 @@ (lib "request.ss" "web-server" "private")))) (define/kw (make #:key - [servlet-root "servlets"] + [htdocs-path "servlets"] [timeouts-servlet-connection (* 60 60 24)] [responders-servlet-loading servlet-loading-responder] @@ -99,7 +99,7 @@ (myprint "begin-session~n") (let ([uri (request-uri req)]) (let-values ([(a-path url-servlet-path url-path-suffix) - (url->servlet-path servlet-root uri)]) + (url->servlet-path htdocs-path uri)]) (myprint "a-path = ~s~n" a-path) (if a-path (parameterize ([current-directory (directory-part a-path)]) diff --git a/collects/web-server/prototype-web-server/private/utils.ss b/collects/web-server/prototype-web-server/private/utils.ss index 16878bd40e..77635cb835 100644 --- a/collects/web-server/prototype-web-server/private/utils.ss +++ b/collects/web-server/prototype-web-server/private/utils.ss @@ -76,10 +76,12 @@ ;; The second value is the prefix of the url-path used to find the servlet. ;; The third value is the remaining suffix of the url-path. (define (url->servlet-path servlet-dir uri) + (printf "~S~n" `(url->servlet-path ,servlet-dir ,uri)) #;(printf " current-directory = ~s~n" (current-directory)) (let loop ([base-path servlet-dir] [servlet-path '()] [path-list (simplify-url-path uri)]) + (printf "~S~n" `(loop ,base-path ,servlet-path ,path-list)) (if (null? path-list) (values #f #f #f) diff --git a/collects/web-server/prototype-web-server/run.ss b/collects/web-server/prototype-web-server/run.ss index ac07ece1e3..cee128c75e 100644 --- a/collects/web-server/prototype-web-server/run.ss +++ b/collects/web-server/prototype-web-server/run.ss @@ -20,8 +20,8 @@ (define dispatch (sequencer:make (filter:make - #rx"^/servlets" - (servlets2:make #:servlet-root (paths-servlet (host-paths host-info)) + #rx"\\.ss$" + (servlets2:make #:htdocs-path (paths-htdocs (host-paths host-info)) #:timeouts-servlet-connection (timeouts-servlet-connection (host-timeouts host-info)) #:responders-servlet-loading (responders-servlet-loading (host-responders host-info)) #:responders-servlet (responders-servlet (host-responders host-info))