--- loncom/auth/lonuploadedacc.pm 2002/08/08 13:45:21 1.2 +++ loncom/auth/lonuploadedacc.pm 2002/11/12 22:23:37 1.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Access Handler for User Files # -# $Id: lonuploadedacc.pm,v 1.2 2002/08/08 13:45:21 www Exp $ +# $Id: lonuploadedacc.pm,v 1.4 2002/11/12 22:23:37 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,13 +36,16 @@ sub handler { my $r = shift; my $args=$r->args; &Apache::loncommon::get_unprocessed_cgi($args,['token']); - my ($dum1,$dum2,$udom,$uname,$ufile)=split(/\//,$r->uri); + my (undef,undef,$udom,$uname,$ufile)=split(/\//,$r->uri); $ufile=~s/^[\~\.]+//; - my ($server)=($ENV{'form.token'}=~/\_([a-zA-Z0-9]+)$/); + my ($homeserver)=($ENV{'form.token'}=~/\_([a-zA-Z0-9]+)$/); + my $remoteip=$ENV{'REMOTE_ADDR'}; + &Apache::lonnet::logthis("remote server $remoteserver"); + my $remoteserver=$Apache::lonnet::iphost{$remoteip}; my $reply=&Apache::lonnet::reply('tokenauthuserfile:'. $udom.'/'.$uname.'/'.$ufile.':'.$ENV{'form.token'}, - $server); + $remoteserver); if ($reply eq 'ok') { return OK; } else {