Skip Menu |

This queue is for tickets about the Catalyst-Plugin-Session-State-URI CPAN distribution.

Report information
The Basics
Id: 57620
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-Session-State-URI

People
Owner: bobtfish [...] bobtfish.net
Requestors: CNG [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: (no value)



Subject: Session not restored if previous attempt to load session failed
I had a problem with loading the correct session which I fixed with the patch below. I use Session-State-Cookie.pm for all actions except for one (coming from Flash/Ajax where I can't set request headers). For that one action I put sessionid in query parameters. Session-State-URI.pm is grabbing the sessionid during prepare_action, but something has already tried loading/reading a session before that. Therefore _tried_loading_session_id is already true so the sessionid via URI is never used. I haven't written any failing tests, not sure how to do that for this issue. Some guidance for writing a failing test would be appreciated. The patch which fixed the problem for me: --- Session-State-URI.pm 2010-05-19 12:08:50.000000000 +1000 +++ /Library/Perl/5.8.8/Catalyst/Plugin/Session/State/URI.pm 2010-05-19 12:10:52.000000000 +1000 @@ -320,6 +320,7 @@ if ( my $sid = $c->request->param($param) ) { $c->_sessionid_from_uri($sid); + $c->_tried_loading_session_id(0); $c->log->debug(qq/Found sessionid "$sid" in query parameters/) if $c->debug; } @@ -331,6 +332,7 @@ $c->log->debug(qq/Found sessionid "$sid" in uri path/) if $c->debug; $c->_sessionid_from_uri($sid); + $c->_tried_loading_session_id(0); } }
From: olaf [...] wundersolutions.com
On Tue May 18 22:27:47 2010, CNG wrote: Show quoted text
> I had a problem with loading the correct session which I fixed with > the patch below. > > I use Session-State-Cookie.pm for all actions except for one (coming > from Flash/Ajax where I can't set request > headers). For that one action I put sessionid in query parameters. >
I had exactly the same problem and I can confirm that this patch fixes it. (We're using "uploadify" for a Flash/AJAX upload). Thanks very much for posting this.
I've applied this patch in the latest version. Thanks!