anchor.diff:  the reason, if it is a string, otherwise a stock reason for the given code.
   If `reason/headers' is a list or `headers' is given a call to `set-headers'
   is made, adding them to the response headers."))
  +
  +(defgeneric write-headers (response &optional headers)
  +  (:documentation "Add any `headers' to the response headers
  +of `response' then write the header list to the client."))
   
   (defgeneric set-headers (response headers)
     (:documentation "Update the outgoing headers on `response'
  
positive.code: (defmethod header ((response http-response) (key string))
    (cdr (assoc key (headers response) :test #'string-equal)))
  
  (defmethod send ((response http-response) data &optional callback)
    (declare (ignore callback))
    "Send a chunk to the client. If this is the first chunk
  and there is no content length set, or no chunked encoding
  header in the headers of the response a content-length header
  is stored before the write. If a chunked encoding header is found
  in the headers of the response the `data' is written as
  an HTTP chunk.
  
  If the response code or headers haven't been written yet, they are
  written first."
    :TODO)
  
negative.code:                    (otherwise (or headers ())))))
  
      (send (sock (peer (request response)))
            (babel:string-to-octets
             (format nil "~A ~A ~A~A~A" (version (request response)) status reason #\Return #\Newline)))
      (setf (status-sent response) t)
  
      (when headers
        (set-headers response headers))))
  
  (defmethod write-headers ((response http-response) &optional headers)
    (when headers
      (set-headers response headers))
  
    (mapc #'(lambda (header-pair)
              (destructuring-bind (key . value) header-pair
                (send (sock (peer (request response)))
                      (babel:string-to-octets
                       (format nil "~A: ~A~A~A" key value #\Return #\Newline)))))
          (headers response))
    (send (sock (peer (request response)))
                      (babel:string-to-octets
                       (format nil "~A~A" #\Return #\Newline)))
    (setf (headers-sent response) t))
  
  (defmethod set-headers ((response http-response) headers)
    (mapc #'(lambda (header-pair)
  