--- loncom/interface/loncss.pm 2006/11/27 16:47:16 1.6 +++ loncom/interface/loncss.pm 2007/10/02 01:10:27 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # gerenates a lon-capa CSS response # -# $Id: loncss.pm,v 1.6 2006/11/27 16:47:16 albertel Exp $ +# $Id: loncss.pm,v 1.7 2007/10/02 01:10:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,7 +32,6 @@ use Apache::lonnet; use Apache::loncommon; use Apache::Constants qw(:common); use POSIX qw(strftime); -use CGI::Cookie(); use LONCAPA; sub handler { @@ -49,16 +48,9 @@ sub handler { my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime(time+86400)); $r->header_out("Expires" => $date); - my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); - my $lonidsdir=$r->dir_config('lonIDsDir'); - - my $handle; - if ($cookies{'lonID'}) { - $handle=&LONCAPA::clean_handle($cookies{'lonID'}->value); - } - - if ($handle ne '' - && -e $r->dir_config('lonIDsDir')."/$handle.id") { + + my $handle = &Apache::lonnet::check_for_valid_session($r); + if ($handle ne '' ) { &Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'), $handle); }