--- loncom/auth/loncacc.pm 2000/01/14 21:12:40 1.5 +++ loncom/auth/loncacc.pm 2000/07/01 17:57:01 1.7 @@ -2,12 +2,13 @@ # Cookie Based Access Handler for Construction Area # (lonacc: 5/21/99,5/22,5/29,5/31 Gerd Kortemeyer) # 6/15,16/11,22/11, -# 01/06,01/11 Gerd Kortemeyer +# 01/06,01/11,6/1 Gerd Kortemeyer package Apache::loncacc; use strict; use Apache::Constants qw(:common :http); +use Apache::File; use CGI::Cookie(); sub handler { @@ -52,6 +53,8 @@ sub handler { my $pair; my $name; my $value; foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); + $value =~ tr/+/ /; + $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; $r->subprocess_env("form.$name" => $value); } return OK; @@ -59,10 +62,10 @@ sub handler { $r->log_reason("Cookie $handle not valid", $r->filename) }; } - $cookie=CGI::Cookie->new(-name => 'lonURL', - -value => $requrl, - -path => '/'); - $r->err_headers_out->add('Set-Cookie' => $cookie); + +# ----------------------------------------------- Store where they wanted to go + + $ENV{'request.firsturl'}=$requrl; return FORBIDDEN; }