--- loncom/lonnet/perl/lonrep.pm 2007/04/26 01:18:47 1.13 +++ loncom/lonnet/perl/lonrep.pm 2020/09/03 13:40:50 1.15 @@ -1,7 +1,7 @@ # The LearningOnline Network # Replication Manager # -# $Id: lonrep.pm,v 1.13 2007/04/26 01:18:47 albertel Exp $ +# $Id: lonrep.pm,v 1.15 2020/09/03 13:40:50 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,7 +32,6 @@ use strict; use Apache::Constants qw(:common :http); use Apache::lonnet; use Apache::File(); -use CGI::Cookie(); sub update_filename { my ($r,$filename) = @_; @@ -60,6 +59,7 @@ sub handler { } else { my $filename=$r->filename.$r->path_info; if ($filename=~/\/$/) { return OK; } + if ($filename eq '/home/httpd/html/res/lib/templates/simpleproblem.problem/smpedit') { return OK; } if (-e "$filename.in.transfer") { sleep 10; if (-e $filename) { @@ -84,10 +84,9 @@ sub handler { } return OK; } - my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); - my $lonid=$cookies{'lonID'}; - if ($lonid) { - $r->log_reason('Replication failed for '.$lonid->value); + my $handle = &Apache::lonnet::check_for_valid_session($r); + if ($handle) { + $r->log_reason('Replication failed for '.$handle); return $response; } else { $r->log_reason('Replication failed for unknown user');