Skip to content

Commit

Permalink
Set correct cookie domain, seems to fix Opera 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgl committed Feb 5, 2007
1 parent 8851389 commit 1144032
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions irc.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use lib qw/modules interfaces/;
no warnings 'uninitialized';

($VERSION =
'$Name: $ 0_5_CVS $Id: irc.cgi,v 1.41 2006/06/06 18:53:50 dgl Exp $'
'$Name: $ 0_5_CVS $Id: irc.cgi,v 1.42 2007/02/05 13:43:17 dgl Exp $'
) =~ s/^.*?(\d\S+) .*?(\d{4}\/\S+) .*$/$1/;
$VERSION .= " ($2)";
$VERSION =~ s/_/./g;
Expand All @@ -42,7 +42,13 @@ for('', '/etc/cgiirc/', '/etc/') {
$config = parse_config($config_path . 'cgiirc.config');

if(!parse_cookie()) {
print "Set-cookie: cgiircauth=". random(25) .";path=/\r\n";
my $cookie_domain = $config->{javascript_domain};
if(defined $cookie_domain) {
$cookie_domain = ";domain=.$cookie_domain";
} else {
$cookie_domain = "";
}
print "Set-cookie: cgiircauth=". random(25) .";path=/$cookie_domain\r\n";
}
print join("\r\n",
# Hack to make sure we print the correct type for stylesheets too..
Expand Down

0 comments on commit 1144032

Please sign in to comment.