   "Turn quoted strings into normal Clojure strings using read-string."
   [cookies]
   (for [[name value] cookies]
-    (let [value (url-decode value)]
+    (let [value (codec/url-decode value)]
       (if (.startsWith ^String value "\"")
         [name (read-string value)]
         [name value]))))

(ns ring.middleware.cookies
  "Cookie manipulation."
  (:use [clojure.contrib.def :only (defvar-)]
        ring.util.codec))

(defvar- re-token #"[!#$%&'*\-+.0-9A-Z\^_`a-z\|~]+"
  "HTTP token: 1*<any CHAR except CTLs or tspecials>. See RFC2068")

(defn- write-value
  "Write the main cookie value."
  [key value]
  (str (name key) "=" (codec/url-encode value)))

(defn- valid-attr?
  "Is the attribute valid?"
