OSDN Git Service

applied patch to fix cookie, closes #13274
authormorimoto <morimoto@180c8125-5b33-4295-ad04-72a68a15b4cc>
Sat, 20 Dec 2008 12:25:49 +0000 (12:25 +0000)
committermorimoto <morimoto@180c8125-5b33-4295-ad04-72a68a15b4cc>
Sat, 20 Dec 2008 12:25:49 +0000 (12:25 +0000)
keitairc
lib/Keitairc/ClientInfo.pm

index 4ee782d..2036420 100755 (executable)
--- a/keitairc
+++ b/keitairc
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # -*- mode: perl; coding: utf-8 -*-
 # keitairc
-# $Id: keitairc,v 1.68 2008-08-03 13:33:39 morimoto Exp $
+# $Id: keitairc,v 1.69 2008-12-20 12:25:49 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/keitairc,v $
 #
 # Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
@@ -183,7 +183,7 @@ sub add_cookie{
                        $hour,
                        $min,
                        $sec);
-       my $content = sprintf("sid=%s; expires=%s; \n", $session_id, $expiration);
+       my $content = sprintf("sid=%s; expires=%s; path=%s; \n", $session_id, $expiration, $cf->web_root());
        $response->push_header('Set-Cookie', $content);
        $response;
 }
index f81bacf..f02de57 100644 (file)
@@ -1,6 +1,6 @@
 # -*- mode: perl; coding: utf-8 -*-
 # Keitairc::ClientInfo
-# $Id: ClientInfo.pm,v 1.10 2008-08-03 13:33:39 morimoto Exp $
+# $Id: ClientInfo.pm,v 1.11 2008-12-20 12:25:49 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/Keitairc/ClientInfo.pm,v $
 #
 # Copyright (c) 2008 Jun Morimoto <morimoto@mrmt.net>
@@ -22,8 +22,8 @@ sub new{
                $me->{header}->{$ukey} = $arg->{_headers}->{$key};
        }
 
-       if(defined $me->{header}->{Cookie}){
-               for my $set (split(/; */, $me->{header}->{Cookie})){
+       if(defined $me->{header}->{cookie}){
+               for my $set (split(/; */, $me->{header}->{cookie})){
                        my ($name, $value) = split(/=/, $set);
                        $value =~ s/%([0-9A-Fa-f]{2})/pack('C', hex($1))/eg;
                        $me->{cookie}->{$name} = $value;