Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually set init-path #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions handin-server/run-servlet.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,14 @@
(wrap-sequence
(and log-file (log:make #:format (log:log-format->format 'apache-default)
#:log-path log-file))
(let ([init-path (make-parameter "/")])
(dispatch/servlet
(lambda (req)
(init-path (url->string (request-uri req)))
(dispatcher req))
#:regexp #rx""
#:manager (make-threshold-LRU-manager
(send-error "Your session has expired")
(* 160 1024 1024))))
(dispatch/servlet
(lambda (req)
(set! init-path (url->string (request-uri req)))
(dispatcher req))
#:regexp #rx""
#:manager (make-threshold-LRU-manager
(send-error "Your session has expired")
(* 160 1024 1024)))
;; This can be used to serve html content too; doesn't make sense now,
;; since the servlet will be used for all requests, and it never calls
;; (next-dispatcher). (See "servlet-env.rkt" for the needed `require's.)
Expand Down