 (defrecord ConnectionState
     [upstream
      downstream
+     address-info
      timeout
      opts]
   Timeout

(defn proto
  [app opts]
  (fn [dn]
    (let [state (atom (ConnectionState. nil dn nil opts))]
      (fn [evt val]
        (let [current-state @state
              next-up (.upstream current-state)]

   #(stream-or-finalize-request state evt val %)))

(defn- handle-request
  [state _ [hdrs body :as request] current-state]
  (let [hdrs         (merge (.address-info current-state) hdrs)
        keepalive?   (keepalive-request? request)
        expects-100? (expecting-100? request)
        head?        (= "HEAD" (hdrs :request-method))
        chunked?     (= :chunked body)
