[Catalyst] More detailed proposal for changes related to content
negotiation and REST
Will Crawford
billcrawford1970 at gmail.com
Wed Aug 14 10:15:56 GMT 2013
On 14 August 2013 10:53, Will Crawford <billcrawford1970 at gmail.com> wrote:
[...]
Also, making it easier to restore a session id after deserialising a
request. I was asked to implement an API that passes session IDs with
an XML request body, rather than in the URL or a cookie. It turned out
to be quite hard to restore the session, because even if I didn't
write to the session at any point before that, anything that called
->sessionid (to see if there was one) caused this:
sub _load_sessionid {
my $c = shift;
return if $c->_tried_loading_session_id;
$c->_tried_loading_session_id(1);
i.e. once you've checked for a session id, it won't try to load it
later, even if you try to set a session id. We worked around this, at
mst's suggestion, by creating a separate app and mounting it in
myapp.psgi; would have preferred to just be able to call a
"manually_set_this_session_id_and_restore_it" method, but couldn't see
one that was part of the public Session api.
More information about the Catalyst
mailing list