diff --git a/src/main/server.cl b/src/main/server.cl index 920aa3a..4a2c66c 100644 --- a/src/main/server.cl +++ b/src/main/server.cl @@ -112,6 +112,16 @@ connection.")) condition)))) ,@body))))) +(defgeneric server-product-info (server) + (:documentation + "Return a list of Product-Info strings suitable for the HTTP +Server Response-Header.")) + +(defmethod server-product-info (server) + (declare (ignore server)) + ;; Default for people to lazy to adjust + '("CLASH/1.0")) + ;;; Simple Server (defclass simple-http-server (http-server) @@ -125,7 +135,7 @@ connection.")) (close-connection connection)) (defmethod read-request ((server simple-http-server) connection) - (parse-request server (connection-stream connection))) + (parse-request server connection)) (defmethod serve-request ((server simple-http-server) request) (let ((resource (namespace-lookup-url (http-server-namespace server) @@ -221,11 +231,10 @@ connection.")) (apply #'make-instance 'string-entity :body - (format nil "~%
~%~A
~%" + (format nil "~%~%~%~A~%~%" (clash-error-code condition) (HTTP-Code-Description (clash-error-code condition)) - (HTTP-Code-Description (clash-error-code condition)) - (HTTP-Code-Description (clash-error-code condition))) + condition) (clash-error-entity-initargs condition)) (clash-error-response-initargs condition))) (error