[Catalyst] warning

Matt S Trout dbix-class at trout.me.uk
Wed Jan 23 11:17:12 GMT 2008


On Wed, Jan 23, 2008 at 12:45:41PM +0200, Octavian Rasnita wrote:
> Hi,
> 
> I've seen that if I skip setting the cookie_domain for the session in 
> MyApp.pm, the authentication works for all the domain names, but only if I 
> use Internet Explorer.
> 
> Firefox doesn't like the cookies without a domain set so the authentication 
> doesn't work at all with this browser.
> 
> So the best solution is to use in Root.pm:
> $c->config->{session}->{cookie_domain} = $c->req->hostname;

Repeatedly overwriting a global is dangerous and indicates you've done
something silly.

This is not a solution, it's a nasty hack which I strongly recommend against,
and is only required because there's something badly wrong with your app or
with its deployment.
 
> It could be helpful if this could be done automaticly if there is no 
> cookie_domain set for the session, instead of not sending any domain.

The current code works out of the box for everybody else.

If you can work out what's wrong with your setup, we'd be happy to take a doc
patch explaining your mistake so the next person to make the same error has
a guide to fixing it.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the Catalyst mailing list