diff --git a/mozilla/webtools/PLIF/PLIF/Input/CGI.pm b/mozilla/webtools/PLIF/PLIF/Input/CGI.pm index 57cc8dc2ef9..ea2f9b45df9 100644 --- a/mozilla/webtools/PLIF/PLIF/Input/CGI.pm +++ b/mozilla/webtools/PLIF/PLIF/Input/CGI.pm @@ -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}; +}