version 1.40, 2003/04/02 14:57:32
|
version 1.45, 2003/05/06 21:45:25
|
Line 88 sub handler {
|
Line 88 sub handler {
|
|
|
my $buffer; |
my $buffer; |
|
|
$r->read($buffer,$r->header_in('Content-length')); |
$r->read($buffer,$r->header_in('Content-length'),0); |
unless ($buffer=~/^(\-+\w+)\s+Content\-Disposition\:\s*form\-data/si) { |
unless ($buffer=~/^(\-+\w+)\s+Content\-Disposition\:\s*form\-data/si) { |
my @pairs=split(/&/,$buffer); |
my @pairs=split(/&/,$buffer); |
my $pair; |
my $pair; |
Line 177 sub handler {
|
Line 177 sub handler {
|
&Apache::lonnet::countacc($requrl); |
&Apache::lonnet::countacc($requrl); |
$requrl=~/\.(\w+)$/; |
$requrl=~/\.(\w+)$/; |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
($requrl=~/^\/adm\/(aboutme|navmaps|smppg|bulletinboard|wrapper)/) || |
($requrl=~/^\/adm\/.*\/(aboutme|navmaps|smppg|bulletinboard)(\?|$)/) || |
|
($requrl=~/^\/adm\/wrapper\//) || |
($requrl=~/^\/public\/.*\/syllabus$/)) { |
($requrl=~/^\/public\/.*\/syllabus$/)) { |
# ------------------------------------- This is serious stuff, get symb and log |
# ------------------------------------- This is serious stuff, get symb and log |
my $query=$r->args; |
my $query=$r->args; |
Line 199 sub handler {
|
Line 200 sub handler {
|
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
} else { |
} else { |
$symb=&Apache::lonnet::symbread; |
$symb=&Apache::lonnet::symbread($requrl); |
|
my ($map,$mid,$murl)=split(/\_\_\_/,$symb); |
|
&Apache::lonnet::symblist($map,$murl => $mid, |
|
'last_known' => $murl); |
} |
} |
$ENV{'request.symb'}=$symb; |
$ENV{'request.symb'}=$symb; |
&Apache::lonnet::courseacclog($symb); |
&Apache::lonnet::courseacclog($symb); |
Line 218 sub handler {
|
Line 222 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; |
|
$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"; |
Line 228 sub handler {
|
Line 235 sub handler {
|
# -------------------------------------------------------------- Not authorized |
# -------------------------------------------------------------- Not authorized |
$requrl=~/\.(\w+)$/; |
$requrl=~/\.(\w+)$/; |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
($requrl=~/^\/adm\/(roles|logout|email)/) || |
($requrl=~/^\/adm\/(roles|logout|email|menu|remote)/) || |
($requrl=~m|^/prtspool/|)) { |
($requrl=~m|^/prtspool/|)) { |
# -------------------------- Store where they wanted to go and get login screen |
# -------------------------- Store where they wanted to go and get login screen |
$ENV{'request.querystring'}=$r->args; |
$ENV{'request.querystring'}=$r->args; |