Nice oneline cookie retrieval
This commit is contained in:
parent
3b724b7f2a
commit
df80d5e190
1 changed files with 2 additions and 7 deletions
|
|
@ -34,6 +34,7 @@ use Apache2::RequestRec ();
|
||||||
use Apache2::RequestIO ();
|
use Apache2::RequestIO ();
|
||||||
use Apache2::Const -compile => qw(OK DECLINED);
|
use Apache2::Const -compile => qw(OK DECLINED);
|
||||||
use Apache2::ServerUtil ();
|
use Apache2::ServerUtil ();
|
||||||
|
use APR::Request::Apache2;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub handler {
|
sub handler {
|
||||||
|
|
@ -55,13 +56,7 @@ sub contentHandler {
|
||||||
my $r = shift;
|
my $r = shift;
|
||||||
my $s = Apache2::ServerUtil->server;
|
my $s = Apache2::ServerUtil->server;
|
||||||
|
|
||||||
my %cookies = Apache2::Cookie->fetch();
|
$session{cookie} = APR::Request::Apache2->handle($r)->jar();
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
WebGUI::Session::open($s->dir_config('WebguiRoot'),$r->dir_config('WebguiConfig'),$r);
|
WebGUI::Session::open($s->dir_config('WebguiRoot'),$r->dir_config('WebguiConfig'),$r);
|
||||||
###----------------------------
|
###----------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue