anchor.diff:                                                  (asdf:find-system :wookie))))))
     headers)
   
  -(defun send-response (response &key (status 200) headers body close)
  +(defun send-response (response &key (status 200) headers body (close nil close-specified-p))
     "Send a response to an incoming request. Takes :status, :headers, and :body
      keyword arguments, which together form an entire response.
   
      If :close is T, close the client connection after the response has been
  -   sent fully."
  +   sent fully. However, send-response does its best to read the request headers
  +   and determine whether or not the connection should be closed. Unless you have
  +   a reason to specify :close, it may be best to leave it blank."
     (wlog +log-debug+ "(response) Send response ~a (status ~a) (close ~a) (headers ~s) (body-length ~a)~%"
                       response status close
                       headers (length body))
  
positive.code: (defclass response ()
    ((headers :accessor response-headers :initarg :headers :initform nil)
     (request :accessor response-request :initarg :request :initform nil)
     (finishedp :accessor response-finished-p :initarg :finishedp :initform nil))
    (:documentation "A class holding information about a response to the client."))
  
  (defmacro with-chunking (request (chunk-data last-chunk-p) &body body)
  
negative.code:       ;; send body if specified
        (when body
          (as:write-socket-data socket body-enc)))
  
      ;; auto-select the best close method, but only if close wasn't specified
      (unless close-specified-p
        (let ((request-headers (request-headers request)))
          (cond
            ;; we're chunking, so don't close yet
            ((string= (getf request-headers :transfer-encoding) "chunked")
             (setf close nil))
            ;; we got Connection: keep-alive. so, keep-alive...
            ((string= (getf request-headers :connection) "keep-alive")
             (setf close nil))
            ;; we got a Connection: close and we're not chunking. close.
            ((string= (getf request-headers :connection) "close")
             (setf close t)))))
  
      ;; if we speficied we want to close, do it now
      (if close
          ;; close the socket once it's done writing
  