     (log/debug "response, status     = " (:status @response))
 
     (-> @response
-        (assoc-in  [:headers "set-cookie"] (str-set-cookie @response))
         (update-in [:headers "location"]  #(rewrite-location %
                                                              host
                                                              (base-url request))))))

    [clojure.string :as str]
    [puppetlabs.http.client.async :as ppasync]
    [puppetlabs.http.client.common :as ppcommon]
    [ring.util.codec :as codec]
    [ring.middleware.cookies :refer [wrap-cookies]]
    [ring.util.parsing :as rp]
    [clj-time.core :refer [in-seconds]]
    [clj-time.format :refer [formatters unparse with-locale]])
  (:import (java.io ByteArrayInputStream)))

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

(defn- write-value
  "Write the main cookie value."
  [key value encoder]
  (encoder {key value}))

(defn- split-equals
  [key-val]
