On Jul 21, 11:42 am, Zach Tellman <ztell...@gmail.com> wrote:
> Both of those seem to be about persisting data across requests.  I
> apologize if I'm being dense, but how does the threading model affect
> how they work?

The flash and session middleware functions update the response
returned from the handler function.  The the updated response is
returned from the middleware and is eventually passed an adapter where
it is written to the network.

If the handler calls Aleph's respond! function, then these middleware
functions never get a chance to update the response.

If the middleware functions are aware of respond! function, then they
can update the response in a wrapper around the original response
function.  For example:

(handler (assoc req :respond! (fn [resp]  ((:respond! req) (do-
something resp))


-- 
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

Reply via email to