                            :headers {"content-encoding" "deflate"}}))
         c-client (client/wrap-decompression client)
         resp (promise)
-        execption (promise)
-        _ (c-client {} resp execption)]
+        exception (promise)
+        _ (c-client {} resp exception)]
     (is (= "barbarbar" (-> @resp :body util/force-byte-array util/utf8-string))
         "string correctly inflated")
     (is (= "deflate" (:orig-content-encoding @resp)))

  (let [client (fn [req respond raise] (respond {:status 200 :req req}))
        r-client (-> client client/wrap-redirects)
        resp (promise)
        execption (promise)
        _ (r-client {:scheme :http :server-name "example.com" :uri "/"
                     :request-method :get} resp execption)]
    (is (= 200 (:status @resp)))
    (is (= :get (:request-method (:req @resp))))
    (is (= :http (:scheme (:req @resp))))
    (is (= [] (:trace-redirects @resp)))
    (is (not (realized? execption)))))

(deftest redirect-without-location-header
  (let [client (fn [req]

                 (respond {:status 302 :body (:body req)}))
        r-client (client/wrap-redirects client)
        resp (promise)
        exception (promise)
        _ (r-client {:body "ok" :follow-redirects false} resp exception)]
    (is (= 302 (:status @resp)))
    (is (= "ok" (:body @resp)))
    (is (nil? (:trace-redirects @resp)))
    (is (not (realized? exception)))))

(deftest throw-on-exceptional
  (let [client (fn [req] {:status 500})
