version 1.18, 2007/02/01 06:20:34
|
version 1.21, 2007/03/02 23:17:48
|
Line 37 use IO::Socket;
|
Line 37 use IO::Socket;
|
sub subscribed { |
sub subscribed { |
my ($filename,$id) = @_; |
my ($filename,$id) = @_; |
|
|
return 0 if (-e "$filename.subscription"); |
return 0 if (!-e "$filename.subscription"); |
|
|
my $hostname=$Apache::lonnet::hostname{$id}; |
my $hostname=&Apache::lonnet::hostname($id); |
my (undef,undef,undef,undef,$ip) = gethostbyname($hostname); |
my (undef,undef,undef,undef,$ip) = gethostbyname($hostname); |
|
|
return 0 if (length($ip) != 4); |
return 0 if (length($ip) != 4); |
Line 58 sub subscribed {
|
Line 58 sub subscribed {
|
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
|
|
|
my $filename=$r->filename; |
|
if (!-e $filename) { |
|
return NOT_FOUND; |
|
} |
|
|
my $reqhost = $r->get_remote_host(REMOTE_NOLOOKUP); |
my $reqhost = $r->get_remote_host(REMOTE_NOLOOKUP); |
my %iphost=&Apache::lonnet::get_iphost(); |
my %iphost=&Apache::lonnet::get_iphost(); |
my $hostids=$iphost{$reqhost}; |
my $hostids=$iphost{$reqhost}; |
Line 73 sub handler {
|
Line 79 sub handler {
|
my @ids; |
my @ids; |
|
|
foreach my $id (@{$hostids}) { |
foreach my $id (@{$hostids}) { |
my $filename=$r->filename; |
|
my $uri =$r->uri; |
my $uri =$r->uri; |
if (($filename=~/\.meta$/) || |
if (($filename=~/\.meta$/) || |
($uri=~m|^/raw/uploaded|) || |
($uri=~m|^/raw/uploaded|) || |