[plt-dev] bugfix for handin-server
AFAICT, the handin-server is written with the assumption that (current-
directory) returns a string. In particular, the 'run-servlet'
function in web-status-server.ss calls string->path on server-dir,
which may be obtained using (current-directory). Fortunately, it
appears that the downstream uses of this value don't require it to be
a string, so it appears that you can fix this problem simply by
removing the call to string->path. Here's the diff:
clements at li21-127:~/class/collects/handin-server$ svn diff web-status-
server.ss
Index: web-status-server.ss
===================================================================
--- web-status-server.ss (revision 14438)
+++ web-status-server.ss (working copy)
@@ -251,14 +251,13 @@
(body ,msg "; " (a ([href "/"]) "restarting") " in 3
seconds.")))
(define ((run-servlet port))
- (define dir (string->path server-dir))
(serve/servlet
(lambda (request)
(parameterize ([current-session (web-counter)])
(login-page (aget (request-bindings request) 'handin) #f)))
#:port port #:listen-ip #f #:ssl? #t #:command-line? #t
#:servlet-path "/" #:servlet-regexp #rx""
- #:server-root-path dir #:servlets-root dir
+ #:server-root-path server-dir #:servlets-root server-dir
#:file-not-found-responder (send-error "File not found")
#:servlet-namespace '(handin-server/private/md5
handin-server/private/logger
I've committed this; naturally, I'll unwind it if I've made a mistake.
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20090406/4e076a58/attachment.p7s>