View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Todd Wade > Catalyst-Plugin-SwiffUploaderCookieHack > Catalyst::Plugin::SwiffUploaderCookieHack



Annotate this POD


New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  


Catalyst::Plugin::SwiffUploaderCookieHack - Hack to get session restored when Flash makes a HTTP request to your app.


There is a major deficiency in the Flash http client. A sane browser plugin would collect cookies that exist in the context it was loaded from and include those cookies in the headers of any http requests it makes.

Flash dosen't always do this, and in the situations where it does the implementation is not optimal.

To work around this, on the client side add your Catalyst::Plugin::Session::State::Cookie's session id to the body of the http request keyed to your session's cookie name and use this plugin to get the session seamlessly restored.


FancyUpload knows about this problem and will put cookies in the http request for you when it uploads a file if you ask it to. See the appendCookieData option at

Then load this plugin in to Catalyst like so:

     use Catalyst (

Now your session will work seamlessly with Flash.


If you try to use the app's Catalyst::Plugin::Session before this plugin runs, things aren't going to work. Try to reference it in the front of the use Catalyst(...) argument list so it runs early.


Todd Wade <>


Copyright 2010 Todd Wade

This sofware is free software, and is licensed under the same terms as perl itself.

syntax highlighting: