Takahiro,
I have made this change. It has been pushed to Clojars as sandbar
"0.3.0-SNAPSHOT". I have improved the implementation of stateful-
session so that hopefully it is bit clearer. Unfortunately, it is a
complex problem to figure out how to correctly merge data that comes
in under the :session key of a response and from the stateful session
atom. To hopefully make this more clear, I have created a table which
shows what Sandbar does in each situation. It is located under the
"Implementation" heading here:
https://github.com/brentonashworth/sandbar/wiki/Stateful-Sessions
As you can see in the table, if the request does not contain
a :session key (Ring session is :empty) and nothing has changed in the
Sandbar session (Sandbar session will also be :empty) then
the :session key will not be included in the response.
Let me know if this is indeed the fix that you were looking for or if
you have any better ideas about how to deal with this problem.