* Try to avoid showing the context when ssl-accept fails -- this happens

often when students do mistakes, and the context output is useless in
  those cases.
* Set the current directory to the server directory, so the certificate
  files can be loaded

svn: r16195
This commit is contained in:
Eli Barzilay 2009-10-01 05:30:27 +00:00
parent a2565bb873
commit 3086800c91

View File

@ -627,7 +627,10 @@
(define session-count 0)
(parameterize ([error-display-handler (lambda (msg exn) (log-line msg))])
(parameterize ([error-display-handler (lambda (msg exn) (log-line msg))]
[current-directory server-dir])
(define (without-context f)
(lambda xs (parameterize ([error-print-context-length 0]) (apply f xs))))
(run-server
(get-conf 'port-number)
(lambda (r w)
@ -679,5 +682,5 @@
(ssl-load-private-key! l "private-key.pem")
l))
ssl-close
ssl-accept
ssl-accept/enable-break))
(without-context ssl-accept)
(without-context ssl-accept/enable-break)))