The `https-port-number' configuration is meaningless, removed and
replaced with `use-https' which defaults to #t. If the web server is disabled, run a tiny "server" that spits out a message -- to avoid students complaining that something is broken. Configuration files with `https-port-number' will throw an error, and should be upgraded. svn: r17450
This commit is contained in:
parent
e423ae7e71
commit
d5f1f59d77
|
@ -70,7 +70,7 @@
|
||||||
[(active-dirs) (values '() path-list )]
|
[(active-dirs) (values '() path-list )]
|
||||||
[(inactive-dirs) (values '() path-list )]
|
[(inactive-dirs) (values '() path-list )]
|
||||||
[(port-number) (values 7979 id )]
|
[(port-number) (values 7979 id )]
|
||||||
[(https-port-number) (values #f id )]
|
[(use-https) (values #t id )]
|
||||||
[(hook-file) (values #f path/false )]
|
[(hook-file) (values #f path/false )]
|
||||||
[(session-timeout) (values 300 id )]
|
[(session-timeout) (values 300 id )]
|
||||||
[(session-memory-limit) (values 40000000 id )]
|
[(session-memory-limit) (values 40000000 id )]
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
@item{Make a @filepath{test} subdirectory in your new directory.}
|
@item{Make a @filepath{test} subdirectory in your new directory.}
|
||||||
|
|
||||||
@item{Create a file @filepath{config.ss} with the following content:
|
@item{Create a file @filepath{config.ss} with the following content:
|
||||||
@schemeblock[((active-dirs ("test"))
|
@schemeblock[((active-dirs ("test")))]}
|
||||||
(https-port-number 7980))]}
|
|
||||||
|
|
||||||
@item{In your new directory, run @commandline{mred-text -l handin-server}}
|
@item{In your new directory, run @commandline{mred-text -l handin-server}}
|
||||||
|
|
||||||
|
@ -50,10 +49,9 @@
|
||||||
The submitted file will be @filepath{.../test/tester/handin.scm}.}
|
The submitted file will be @filepath{.../test/tester/handin.scm}.}
|
||||||
|
|
||||||
@item{Check the status of your submission by pointing a web browser at
|
@item{Check the status of your submission by pointing a web browser at
|
||||||
@tt{https://localhost:7980/}. Note the ``s'' in ``https''. Use the
|
@tt{https://localhost:7979/}. Note the ``s'' in ``@tt{https}''. Use
|
||||||
``@tt{tester}'' username and ``@tt{pw}'' password, as before.
|
the ``@tt{tester}'' username and ``@tt{pw}'' password, as before.
|
||||||
|
|
||||||
NOTE: The @scheme[https-port-number] line in the
|
NOTE: The embedded web server can be disabled in the configuration
|
||||||
@filepath{config.ss} file enables the embedded secure server. You
|
file if you don't want to use it.}
|
||||||
can remove it if you don't want it.}
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -41,9 +41,9 @@ This directory contains the following files and sub-directories:
|
||||||
@item{@indexed-scheme[port-number] --- the port for the main handin
|
@item{@indexed-scheme[port-number] --- the port for the main handin
|
||||||
server; the default is 7979.}
|
server; the default is 7979.}
|
||||||
|
|
||||||
@item{@indexed-scheme[https-port-number] --- the port number for the
|
@item{@indexed-scheme[use-https] --- determines whether to start an
|
||||||
handin-status HTTPS server; the default is @scheme[#f] which
|
embedded web server for handin status reports; the default is
|
||||||
indicates that no HTTPS server is started.}
|
@scheme[#t].}
|
||||||
|
|
||||||
@item{@indexed-scheme[session-timeout] --- number of seconds before
|
@item{@indexed-scheme[session-timeout] --- number of seconds before
|
||||||
the session times-out. The client is given this many seconds for
|
the session times-out. The client is given this many seconds for
|
||||||
|
@ -470,9 +470,9 @@ the correct assignment in the handin dialog.
|
||||||
|
|
||||||
A student can download his/her own submissions through the handin
|
A student can download his/her own submissions through the handin
|
||||||
dialog. This can also be done through a web server that runs
|
dialog. This can also be done through a web server that runs
|
||||||
concurrently with the handin server if you use the
|
concurrently with the handin server (on the same port) if you set the
|
||||||
@scheme[https-port-number] option in the configuration file. The
|
@scheme[use-https] option in the configuration file to @scheme[#t] (the
|
||||||
starting URL is
|
default). The starting URL is
|
||||||
|
|
||||||
@commandline{https://SERVER:PORT/}
|
@commandline{https://SERVER:PORT/}
|
||||||
|
|
||||||
|
|
|
@ -254,16 +254,27 @@
|
||||||
|
|
||||||
(provide run)
|
(provide run)
|
||||||
(define (run)
|
(define (run)
|
||||||
(cond [(get-conf 'https-port-number)
|
(if (get-conf 'use-https)
|
||||||
=> (lambda (p)
|
(begin0 (parameterize ([error-print-context-length 0])
|
||||||
(begin0 (parameterize ([error-print-context-length 0])
|
(run-servlet
|
||||||
(run-servlet
|
dispatcher
|
||||||
dispatcher
|
#:namespace '(handin-server/private/md5
|
||||||
#:namespace '(handin-server/private/md5
|
handin-server/private/logger
|
||||||
handin-server/private/logger
|
handin-server/private/config
|
||||||
handin-server/private/config
|
handin-server/private/hooker
|
||||||
handin-server/private/hooker
|
handin-server/private/reloadable)
|
||||||
handin-server/private/reloadable)
|
#:log-file (get-conf 'web-log-file)))
|
||||||
#:log-file (get-conf 'web-log-file)))
|
(log-line "*** embedded web server started"))
|
||||||
(log-line "*** embedded web server started")))]
|
;; simple "server" so it's known that there is no server
|
||||||
[else void]))
|
(lambda (msg . args)
|
||||||
|
(when (eq? 'connect msg)
|
||||||
|
(for-each (lambda (x) (display x (cadr args)))
|
||||||
|
'(#"HTTP/1.0 200 OK\r\n"
|
||||||
|
#"Content-Type: text/html\r\n"
|
||||||
|
#"\r\n"
|
||||||
|
#"<html><body><h1>"
|
||||||
|
#"Please use the handin plugin"
|
||||||
|
#"</h1></body></html>"))
|
||||||
|
(close-input-port (car args))
|
||||||
|
(close-output-port (cadr args))
|
||||||
|
(semaphore-post (caddr args))))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user