--- loncom/interface/loncss.pm 2006/06/28 16:04:34 1.3 +++ loncom/interface/loncss.pm 2010/08/31 15:07:19 1.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # gerenates a lon-capa CSS response # -# $Id: loncss.pm,v 1.3 2006/06/28 16:04:34 albertel Exp $ +# $Id: loncss.pm,v 1.8 2010/08/31 15:07:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,7 +32,7 @@ use Apache::lonnet; use Apache::loncommon; use Apache::Constants qw(:common); use POSIX qw(strftime); -use CGI::Cookie(); +use LONCAPA; sub handler { my ($r) = @_; @@ -41,24 +41,16 @@ sub handler { $url =~ s{^/adm/css/}{}; $url =~ s{ \.css $ }{}xms; - my ($uname,$udom,$timestamp,$function,$domain,$bgcolor) = + my ($uname,$udom,$version,$timestamp,$function,$domain,$bgcolor) = split(':',$url); $r->content_type('text/css'); - my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime(time+600)); + 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=$cookies{'lonID'}->value; - $handle=~s/\W//g; - } - - if ($handle ne '' - && -e $r->dir_config('lonIDsDir')."/$handle.id") { + $r->header_out->add("Cache-Control" => "public, no-transform"); + + my $handle = &Apache::lonnet::check_for_valid_session($r); + if ($handle ne '' ) { &Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'), $handle); } 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.