version 1.25, 2001/12/15 20:40:23
|
version 1.32, 2002/06/15 19:20:14
|
Line 33
|
Line 33
|
# YEAR=2001 |
# YEAR=2001 |
# 01/06/01,05/28,8/11,9/26,11/29 Gerd Kortemeyer |
# 01/06/01,05/28,8/11,9/26,11/29 Gerd Kortemeyer |
# 12/15 Scott Harrison |
# 12/15 Scott Harrison |
|
# YEAR=2002 |
|
# 1/4,2/25 Gerd Kortemeyer |
# |
# |
### |
### |
|
|
Line 81 sub handler {
|
Line 83 sub handler {
|
} |
} |
$ENV{'request.filename'} = $r->filename; |
$ENV{'request.filename'} = $r->filename; |
|
|
|
$ENV{'request.copyright'} = |
|
&Apache::lonnet::metadata($requrl,'copyright'); |
|
|
# -------------------------------------------------------- Load POST parameters |
# -------------------------------------------------------- Load POST parameters |
|
|
|
|
Line 98 sub handler {
|
Line 103 sub handler {
|
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; |
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; |
$name =~ tr/+/ /; |
$name =~ tr/+/ /; |
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; |
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; |
$ENV{"form.$name"}=$value; |
&Apache::loncommon::add_to_env("form.$name",$value); |
} |
} |
} else { |
} else { |
my $contentsep=$1; |
my $contentsep=$1; |
Line 118 sub handler {
|
Line 123 sub handler {
|
} else { |
} else { |
$value=~s/\s+$//s; |
$value=~s/\s+$//s; |
} |
} |
$ENV{"form.$name"}=$value; |
&Apache::loncommon::add_to_env("form.$name",$value); |
} |
} |
if ($i<$#lines) { |
if ($i<$#lines) { |
$i++; |
$i++; |
Line 146 sub handler {
|
Line 151 sub handler {
|
} |
} |
} |
} |
} |
} |
|
$ENV{'request.method'}=$ENV{'REQUEST_METHOD'}; |
$r->method_number(M_GET); |
$r->method_number(M_GET); |
$r->method('GET'); |
$r->method('GET'); |
$r->headers_in->unset('Content-length'); |
$r->headers_in->unset('Content-length'); |
Line 169 sub handler {
|
Line 175 sub handler {
|
$requrl=~/\.(\w+)$/; |
$requrl=~/\.(\w+)$/; |
if (&Apache::loncommon::fileembstyle($1) eq 'ssi') { |
if (&Apache::loncommon::fileembstyle($1) eq 'ssi') { |
# ------------------------------------- This is serious stuff, get symb and log |
# ------------------------------------- This is serious stuff, get symb and log |
my $symb=&Apache::lonnet::symbread; |
my $query=$r->args; |
|
my $symb; |
|
if ($query) { |
|
&Apache::loncommon::get_unprocessed_cgi($query,['symb']); |
|
} |
|
if ($ENV{'form.symb'}) { |
|
$symb=&Apache::lonnet::symbclean($ENV{'form.symb'}); |
|
if (&Apache::lonnet::symbverify($symb,$requrl)) { |
|
my ($map,$mid,$murl)=split(/\_\_\_/,$symb); |
|
&Apache::lonnet::symblist($map,$murl => $mid, |
|
'last_known' => $murl); |
|
} else { |
|
$r->log_reason('Invalid symb for '.$requrl.': '. |
|
$symb); |
|
$ENV{'user.error.msg'}= |
|
"$requrl:bre:1:1:Invalid Access"; |
|
return HTTP_NOT_ACCEPTABLE; |
|
} |
|
} else { |
|
$symb=&Apache::lonnet::symbread; |
|
} |
$ENV{'request.symb'}=$symb; |
$ENV{'request.symb'}=$symb; |
&Apache::lonnet::courseacclog($symb); |
&Apache::lonnet::courseacclog($symb); |
} else { |
} else { |