Add support for cookies using the new getSessionData() API.
git-svn-id: svn://10.0.0.236/trunk@135588 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c0c07ec40c
commit
10d67334f2
@ -84,6 +84,14 @@ sub splitArguments {
|
||||
# Some other authentication scheme
|
||||
}
|
||||
}
|
||||
# hook in cookies
|
||||
$self->cookies({}); # empty the list of cookies first
|
||||
if (defined($ENV{'HTTP_COOKIE'})) {
|
||||
foreach my $cookie (split(/; /os, $ENV{'HTTP_COOKIE'})) {
|
||||
my($field, $value) = split(/=/os, $cookie);
|
||||
$self->cookies->{$field} = $value;
|
||||
}
|
||||
}
|
||||
# decode the arguments
|
||||
$self->decodeHTTPArguments;
|
||||
}
|
||||
@ -154,3 +162,10 @@ sub registerPropertyAsMetaData {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# cookies
|
||||
sub getSessionData {
|
||||
my $self = shift;
|
||||
my($field) = @_;
|
||||
return $self->cookies->{$field};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user