version 1.13, 2007/04/26 01:18:47
|
version 1.15, 2020/09/03 13:40:50
|
Line 32 use strict;
|
Line 32 use strict;
|
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::File(); |
use Apache::File(); |
use CGI::Cookie(); |
|
|
|
sub update_filename { |
sub update_filename { |
my ($r,$filename) = @_; |
my ($r,$filename) = @_; |
Line 60 sub handler {
|
Line 59 sub handler {
|
} else { |
} else { |
my $filename=$r->filename.$r->path_info; |
my $filename=$r->filename.$r->path_info; |
if ($filename=~/\/$/) { return OK; } |
if ($filename=~/\/$/) { return OK; } |
|
if ($filename eq '/home/httpd/html/res/lib/templates/simpleproblem.problem/smpedit') { return OK; } |
if (-e "$filename.in.transfer") { |
if (-e "$filename.in.transfer") { |
sleep 10; |
sleep 10; |
if (-e $filename) { |
if (-e $filename) { |
Line 84 sub handler {
|
Line 84 sub handler {
|
} |
} |
return OK; |
return OK; |
} |
} |
my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); |
my $handle = &Apache::lonnet::check_for_valid_session($r); |
my $lonid=$cookies{'lonID'}; |
if ($handle) { |
if ($lonid) { |
$r->log_reason('Replication failed for '.$handle); |
$r->log_reason('Replication failed for '.$lonid->value); |
|
return $response; |
return $response; |
} else { |
} else { |
$r->log_reason('Replication failed for unknown user'); |
$r->log_reason('Replication failed for unknown user'); |