anchor.diff:  (defmethod header ((response http-response) (key string))
     (cdr (assoc key (headers response) :test #'string-equal)))
   
  +(defmethod begin ((response http-response))
  +  (unless (status-sent-p response)
  +    (write-head 200 "OK"))
  +
  +  (unless (headers-sent-p response)
  +    (write-headers response)))
  +
   (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.
  +  "Send a chunk to the client.
  +
  +If this is the first chunk and there is no content length set,
  +or no chunked encoding set 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.
  +
  +No verification is made that the `data' does not exceed the advertised
  +content length if one is present.
   
   If the response code or headers haven't been written yet, they are
   written first."
  -  :TODO)
  +  (let ((bindata (if (stringp data) (babel:string-to-octets data) data)))
  +    (unless (or (header response "Content-Length")
  +                (string-equal (header response "Transfer-Encoding") "chunked"))
  +      (setf (header response "Content-Length") (length bindata)))
  +
  +    (begin response)
  +
  +    (if (string-equal (header response "Transfer-Encoding") "chunked")
  +        (format t "TODO: Chunked encoding is not supported")
  +        (send (sock (peer (request response)))
  +              bindata))))
  +
  +(defmethod end ((response http-response) &optional data)
  +  (if data
  +      (send response data)
  +      (begin response))
  +
  +  (if (string-equal (header response "Connection") "close")
  +      (add-listener (sock (peer (request response))) "drain"
  +                    (lambda (sock)
  +                      (format t "~S Closing connection after body send.~%" (peer (request response)))
  +                      (close sock)))
  +
  +      (setf (parser (peer (request response)))
  +            (make-instance 'request-parser :peer (peer (request response))))))
  
positive.code:                    (otherwise (or headers ())))))
  
      (send (sock (peer (request response)))
            (babel:octets-to-string
             (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 set-headers ((response http-response) headers)
    (mapc #'(lambda (header-pair)
  
negative.code: 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'
  