better messages, clarify comment

svn: r17431
This commit is contained in:
Eli Barzilay 2009-12-30 04:16:32 +00:00
parent e821a0c461
commit 1d7f3ff2f4
3 changed files with 7 additions and 5 deletions

View File

@ -636,8 +636,9 @@
[error-print-context-length 0] [error-print-context-length 0]
[current-directory server-dir]) [current-directory server-dir])
(define port (get-conf 'port-number)) (define port (get-conf 'port-number))
(log-line "server started on port ~a ------------------------------" port) (define (start-notify)
(hook 'server-start `([port ,port])) (log-line "*** handin server started on port ~a" port)
(hook 'server-start `([port ,port])))
(run-server (run-server
port port
(lambda (r w) (lambda (r w)
@ -697,5 +698,6 @@
(let ([l (ssl-listen port-k cnt #t)]) (let ([l (ssl-listen port-k cnt #t)])
(ssl-load-certificate-chain! l "server-cert.pem") (ssl-load-certificate-chain! l "server-cert.pem")
(ssl-load-private-key! l "private-key.pem") (ssl-load-private-key! l "private-key.pem")
(start-notify)
l)) l))
ssl-close ssl-accept ssl-accept/enable-break)) ssl-close ssl-accept ssl-accept/enable-break))

View File

@ -53,8 +53,8 @@
(send-error "Your session has expired" init-path) (send-error "Your session has expired" init-path)
(* 12 1024 1024)))) (* 12 1024 1024))))
;; This can be used to serve html content too; doesn't make sense now, ;; This can be used to serve html content too; doesn't make sense now,
;; since the servlet will be used for all requests. (See "servlet-env.ss" ;; since the servlet will be used for all requests, and it never calls
;; for the needed `require's) ;; (next-dispatcher). (See "servlet-env.ss" for the needed `require's.)
;; (files:make ;; (files:make
;; #:url->path (fsmap:make-url->path (build-path server-dir "htdocs"))) ;; #:url->path (fsmap:make-url->path (build-path server-dir "htdocs")))
;; (lift:make (send-error "File not found" (lambda () "/"))) ;; (lift:make (send-error "File not found" (lambda () "/")))

View File

@ -256,7 +256,7 @@
(define (run) (define (run)
(cond [(get-conf 'https-port-number) (cond [(get-conf 'https-port-number)
=> (lambda (p) => (lambda (p)
(log-line "*** starting web server") (log-line "*** starting embedded web server on port ~a" p)
(parameterize ([error-print-context-length 0]) (parameterize ([error-print-context-length 0])
(run-servlet dispatcher p server-dir (run-servlet dispatcher p server-dir
#:namespace '(handin-server/private/md5 #:namespace '(handin-server/private/md5