(201, 304, 404). Added export of type-predicate no-body?. Adapted
SEND-HTTP-RESPONSE to check for no-body responses. Extended
MAKE-ERROR-RESPONSE to make responses 201, 304, 404.
(1)no special treatment of first "optional" argument
- rationale: a different number of args is required depending on the
specific error code
(2)use close-html to write out all _effectively_ optional args
(3)generated html-pages are valid XHTML 1.0 Strict
(4)require header Allow for 405 errors
(5)more exact descriptions of errors in generated html-pages
TODO: handle calls of make-error-response with too little args
return code HTTP-STATUS/REDIRECT, the server creates a new request out of
the redirection response and recalls the handler to serve the request.
You can use MAKE-REDIRECTION-RESPONSE to create this special response.
Path handlers must now return a response object similar to the
response objects of the PLT web server, encapsulating headers, mime
type, status code, and so on.
A response object in turn can contain an encoding of a body. The only
presently supported body type is a procedure which just prints the
body.
Other changes:
- split file-dir-handler.scm out from handlers.scm
- moved the ICON-NAME constructor parameters for file handlers to the
options
- removed input/output port redirections and work with paths
explicitly