To add some background to this: the author reported this as an issue on Ring. They appear to be trying to turn clj-http response into a Ring response, so this isn't anything directly to do with cookies. The problem is that clj-http responses are similar but not identical to Ring responses.
Perhaps the author could explain what they're trying to do? - James On 8 January 2017 at 14:00, 松舘剛志 <t.matsud...@gmail.com> wrote: > For example, > > > When call some Twitter APIs: > > > (ns foo > (:require [clj-http.client :as http] > [ring.util.response :as ring]) > (:import [clojure.lang ExceptionInfo])) > > (try > (let [response (http/post "https://api.twitter.com/1.1/statuses/show.json")] > #_"Something to do." > (ring/status response 200)) > (catch ExceptionInfo e > #_"Something to do.")) > > In any case, this will return AssertionError. > > > ERROR in (statuses-show-test) (cookies.clj:73) >> > Uncaught exception, not in assertion. expected: nil actual: > java.lang.AssertionError: Assert failed: (every? valid-attr? attrs) > Fllowing some stacktraces... > > > This has been failed pre-assert for ring.middleware.cookies/write-attr-map > because the Expires field in cookies via Twitter is not RFC822. Its format is > EEE, dd-MMM-yyyy HH:mm:ss z (in US locale). How should I do for responding > via Twitter APIs with valid Expires? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.