--- loncom/interface/lonerrorhandler.pm 2003/08/05 12:52:23 1.4 +++ loncom/interface/lonerrorhandler.pm 2005/04/07 06:56:23 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network # Internal Server Error Handler # -# $Id: lonerrorhandler.pm,v 1.4 2003/08/05 12:52:23 www Exp $ +# $Id: lonerrorhandler.pm,v 1.7 2005/04/07 06:56:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -31,10 +31,11 @@ package Apache::lonerrorhandler; use strict; use Apache::Constants qw(:common); use Apache::loncommon; +use Apache::lonnet; sub handler { my $r = shift; - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; @@ -42,7 +43,10 @@ sub handler { my $envkey; my $env=''; - foreach $envkey (sort keys %ENV) { + foreach $envkey (sort(keys(%env))) { + $env.="$envkey: $env{$envkey}\n"; + } + foreach $envkey (sort(keys(%ENV))) { $env.="$envkey: $ENV{$envkey}\n"; } @@ -55,10 +59,11 @@ sub handler { my $req=$r->as_string(); $req=~s/\"/\'\'/g; + my $html=&Apache::lonxml::xmlbegin(); my $bodytag=&Apache::loncommon::bodytag('Could Not Process Request'); # --------------------------------------------------- Print login screen header $r->print(< +$html The LearningOnline Network with CAPA