wrap-session in nested app

2 views
Skip to first unread message

Trent Ogren

unread,
Dec 21, 2011, 11:50:10 AM12/21/11
to Moustache Club
This tripped me up when developing an app that only needed a session
in the "admin" part of the app:

(def nested-session (app
["admin" &] (app
wrap-session
[""] handler))) ; handlers' response :session entry has no effect

(def session-at-top-level (app
wrap-session
["admin" &] (app
[""] handler))) ; handlers' response :session works as expected

Shouldn't the wrap-session middleware work regardless of it's level of
nesting?

Here's a more complete test case:
https://gist.github.com/1506329


Cheers,
Trent
Reply all
Reply to author
Forward
0 new messages