[LON-CAPA-cvs] cvs: loncom /auth lonuploadedacc.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 12 Nov 2002 22:37:18 -0000


albertel		Tue Nov 12 17:37:18 2002 EDT

  Modified files:              
    /loncom/auth	lonuploadedacc.pm 
  Log:
  - I think it is correct now
  
  
Index: loncom/auth/lonuploadedacc.pm
diff -u loncom/auth/lonuploadedacc.pm:1.5 loncom/auth/lonuploadedacc.pm:1.6
--- loncom/auth/lonuploadedacc.pm:1.5	Tue Nov 12 17:28:48 2002
+++ loncom/auth/lonuploadedacc.pm	Tue Nov 12 17:37:18 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Access Handler for User Files
 #
-# $Id: lonuploadedacc.pm,v 1.5 2002/11/12 22:28:48 albertel Exp $
+# $Id: lonuploadedacc.pm,v 1.6 2002/11/12 22:37:18 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -34,15 +34,14 @@
 
 sub handler {
     my $r = shift;
+    my $c = $r->connection;
     my $args=$r->args;
     &Apache::loncommon::get_unprocessed_cgi($args,['token']); 
     my (undef,undef,$udom,$uname,$ufile)=split(/\//,$r->uri);
     $ufile=~s/^[\~\.]+//;
     my ($homeserver)=($ENV{'form.token'}=~/\_([a-zA-Z0-9]+)$/);
-    my $remoteip=$ENV{'REMOTE_ADDR'};
+    my $remoteip=$c->remote_ip;
     my $remoteserver=$Apache::lonnet::iphost{$remoteip};
-    &Apache::lonnet::logthis("remote server $remoteip $remoteserver");
-
     my $reply=&Apache::lonnet::reply('tokenauthuserfile:'.
                  $udom.'/'.$uname.'/'.$ufile.':'.$ENV{'form.token'},
 				     $remoteserver);