--- loncom/auth/loncacc.pm 1999/10/13 17:48:52 1.1.1.1 +++ loncom/auth/loncacc.pm 2000/01/14 21:12:40 1.5 @@ -1,7 +1,8 @@ # The LearningOnline Network # Cookie Based Access Handler for Construction Area # (lonacc: 5/21/99,5/22,5/29,5/31 Gerd Kortemeyer) -# 6/15 Gerd Kortemeyer +# 6/15,16/11,22/11, +# 01/06,01/11 Gerd Kortemeyer package Apache::loncacc; @@ -31,6 +32,28 @@ sub handler { ("$username at $domain not authorized", $r->filename); return HTTP_NOT_ACCEPTABLE; } + my @profile; + { + my $idf=Apache::File->new("$lonidsdir/$handle.id"); + @profile=<$idf>; + } + my $envi; + for ($envi=0;$envi<=$#profile;$envi++) { + chomp($profile[$envi]); + my ($envname,$envvalue)=split(/=/,$profile[$envi]); + $r->subprocess_env("$envname" => "$envvalue"); + } + $r->subprocess_env("user.environment" => "$lonidsdir/$handle.id", + "request.state" => "construct", + "request.filename" => $r->filename); + my $buffer; + $r->read($buffer,$r->header_in('Content-length')); + my @pairs=split(/&/,$buffer); + my $pair; my $name; my $value; + foreach $pair (@pairs) { + ($name,$value) = split(/=/,$pair); + $r->subprocess_env("form.$name" => $value); + } return OK; } else { $r->log_reason("Cookie $handle not valid", $r->filename)