From df80d5e1908b020998d8df91b50d4dcf2aa60197 Mon Sep 17 00:00:00 2001 From: Len Kranendonk Date: Fri, 4 Nov 2005 16:52:14 +0000 Subject: [PATCH] Nice oneline cookie retrieval --- lib/WebGUI.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index 7e40316b2..6751698d9 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -34,6 +34,7 @@ use Apache2::RequestRec (); use Apache2::RequestIO (); use Apache2::Const -compile => qw(OK DECLINED); use Apache2::ServerUtil (); +use APR::Request::Apache2; #------------------------------------------------------------------- sub handler { @@ -55,13 +56,7 @@ sub contentHandler { my $r = shift; my $s = Apache2::ServerUtil->server; - my %cookies = Apache2::Cookie->fetch(); - foreach my $key (keys %cookies) { - my $value = $cookies{$key}; - $value =~ s/$key=//; # Strange... The Apache2::Cookie value also contains the key ???? - # Must be a bug in Apache2::Cookie... - $session{cookie}{$key} = $value; - } + $session{cookie} = APR::Request::Apache2->handle($r)->jar(); WebGUI::Session::open($s->dir_config('WebguiRoot'),$r->dir_config('WebguiConfig'),$r); ###----------------------------