--- loncom/interface/loncss.pm 2006/06/05 22:01:46 1.2 +++ loncom/interface/loncss.pm 2006/11/27 16:47:16 1.6 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # gerenates a lon-capa CSS response # -# $Id: loncss.pm,v 1.2 2006/06/05 22:01:46 albertel Exp $ +# $Id: loncss.pm,v 1.6 2006/11/27 16:47:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,6 +33,7 @@ use Apache::loncommon; use Apache::Constants qw(:common); use POSIX qw(strftime); use CGI::Cookie(); +use LONCAPA; sub handler { my ($r) = @_; @@ -41,11 +42,11 @@ sub handler { $url =~ s{^/adm/css/}{}; $url =~ s{ \.css $ }{}xms; - my ($uname,$domain,$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')); @@ -53,8 +54,7 @@ sub handler { my $handle; if ($cookies{'lonID'}) { - $handle=$cookies{'lonID'}->value; - $handle=~s/\W//g; + $handle=&LONCAPA::clean_handle($cookies{'lonID'}->value); } if ($handle ne ''