   (log/debug "rewrite result" result)
   result))
 
-(defn- extract-body
-  [request]
-  (let [accept (get-in request [:headers "accept-encoding"])]
-    (if (and accept (.startsWith accept "gzip"))
-      (slurp-body-binary request)
-      (slurp-body request))))
-
 (defn- redirect
   [host request-uri request]
 

        :body
        (slurp-binary (Integer/parseInt len))
        ByteArrayInputStream.)))

(defn- slurp-body
  [request]
  (if-let [len (when (:body request) (get-in request [:headers "content-length"]))]
    (-> request
        :body
        (slurp-binary (Integer/parseInt len))
        String.)))

(def ^{:private true, :doc "RFC6265 cookie-octet"}
re-cookie-octet


        response (request-fn @client redirected-url
                             {:query-params (merge (to-query-params (:query-string request)) (:params request))
                              :body         (slurp-body-binary request)
                              :headers      (-> request
                                                :headers
                                                (dissoc "host" "content-length"))})]
