               current-state
               (assoc current-state
                 :ch         ch-or-err
-                :next-up-fn write-pending)))
+                :next-dn-fn write-pending)))
           (fn [current-state]
             (if (.aborted? current-state)
               ;; Return to the connection pool

  (when (and (is-100-continue? msg) (not (.expects-100? current-state)))
    (throw (Exception. "Not expecting a 100 Continue response.")))

  (let [downstream-fn (.downstream current-state)
        upstream-fn   (.upstream current-state)]
    (swap-then!
     state
     (fn [current-state]


(defn- finalize-request
  [current-state]
  (when (= request-complete (.next-dn-fn current-state))
    (netty/on-complete
     (.last-write current-state)
     (fn [_]
