version 1.54, 2004/12/17 19:43:19
|
version 1.60, 2005/01/28 09:30:40
|
Line 138 sub handler {
|
Line 138 sub handler {
|
} |
} |
} else { |
} else { |
$symb=&Apache::lonnet::symbread($requrl); |
$symb=&Apache::lonnet::symbread($requrl); |
|
if (&Apache::lonnet::is_on_map($requrl) && $symb && |
|
!&Apache::lonnet::symbverify($symb,$requrl)) { |
|
$r->log_reason('Invalid symb for '.$requrl.': '.$symb); |
|
$ENV{'user.error.msg'}= |
|
"$requrl:bre:1:1:Invalid Access"; |
|
return HTTP_NOT_ACCEPTABLE; |
|
} |
my ($map,$mid,$murl)=split(/\_\_\_/,$symb); |
my ($map,$mid,$murl)=split(/\_\_\_/,$symb); |
&Apache::lonnet::symblist($map,$murl => $mid, |
&Apache::lonnet::symblist($map,$murl => $mid, |
'last_known' => $murl); |
'last_known' => $murl); |
Line 159 sub handler {
|
Line 166 sub handler {
|
if ($requrl=~m|^/public/| |
if ($requrl=~m|^/public/| |
|| (&Apache::lonnet::metadata($requrl,'copyright') eq 'public')) { |
|| (&Apache::lonnet::metadata($requrl,'copyright') eq 'public')) { |
&Apache::lonnet::logthis('Granting public access: '.$requrl); |
&Apache::lonnet::logthis('Granting public access: '.$requrl); |
my $buffer; |
&Apache::loncommon::get_posted_cgi($r); |
$r->read($buffer,$r->header_in('Content-length'),0); |
|
&Apache::loncommon::get_unprocessed_cgi($buffer); |
|
$ENV{'user.name'}='public'; |
$ENV{'user.name'}='public'; |
$ENV{'user.domain'}='public'; |
$ENV{'user.domain'}='public'; |
$ENV{'request.state'} = "published"; |
$ENV{'request.state'} = "published"; |
$ENV{'request.publicaccess'} = 1; |
$ENV{'request.publicaccess'} = 1; |
$ENV{'request.filename'} = $r->filename; |
$ENV{'request.filename'} = $r->filename; |
|
my ($httpbrowser, $clientbrowser, $clientversion, |
|
$clientmathml, $clientunicode, $clientos) = |
|
&Apache::loncommon::decode_user_agent($r); |
|
$ENV{'browser.type'}=$clientbrowser; |
|
$ENV{'browser.version'}=$clientversion; |
|
$ENV{'browser.mathml'}=$clientmathml; |
|
$ENV{'browser.unicode'}=$clientunicode; |
|
$ENV{'browser.os'}=$clientos; |
|
|
return OK; |
return OK; |
} |
} |
# -------------------------------------------------------------- Not authorized |
# -------------------------------------------------------------- Not authorized |