diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index 68b51e22d..126fec946 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -34,7 +34,6 @@ use Apache2::RequestRec (); use Apache2::RequestIO (); use Apache2::Const -compile => qw(OK DECLINED); use Apache2::ServerUtil (); -use APR::Request::Apache2; #------------------------------------------------------------------- sub handler { diff --git a/lib/WebGUI/HTTP.pm b/lib/WebGUI/HTTP.pm index 0518b604b..0b98a19b8 100644 --- a/lib/WebGUI/HTTP.pm +++ b/lib/WebGUI/HTTP.pm @@ -17,6 +17,7 @@ package WebGUI::HTTP; use strict; use Apache2::Cookie; +use APR::Request::Apache2; use WebGUI::Session; use WebGUI::Style; @@ -61,13 +62,7 @@ Retrieves the cookies from the HTTP header, persists them to the session, and re =cut sub getCookies { - 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... - $WebGUI::Session::session{cookie}{$key} = $value; - } + $WebGUI::Session::session{cookie} = APR::Request::Apache2->handle($session{req})->jar(); return $WebGUI::Session::session{cookie}; }