diff --git a/src/main/responses.cl b/src/main/responses.cl index 61d4351..592e7f8 100644 --- a/src/main/responses.cl +++ b/src/main/responses.cl @@ -24,22 +24,24 @@ (make-instance 'string-entity :content-type "text/html" :body - (apply #'standard-response-body status-code args)) + (apply #'standard-response-body + (http-message-server request) + status-code args)) args)) -(defgeneric standard-response-body (status-code &rest args)) +(defgeneric standard-response-body (server status-code &rest args)) -(defmethod standard-response-body (status-code &rest args) - (declare (ignore args)) - (format nil "~%
~%The new location is ~:*~A.
~%~%" + (server (status-code (eql +HTTP-Code-Moved-Temporarily+)) &rest args + &key location) + (declare (ignore server args)) + (format nil "~%~%The new location is ~:*~A.
~%~%" status-code (HTTP-Code-Description status-code) location))