--- loncom/auth/lonuploadedacc.pm 2003/05/13 01:56:32 1.9 +++ loncom/auth/lonuploadedacc.pm 2004/02/11 00:10:02 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network # Access Handler for User Files # -# $Id: lonuploadedacc.pm,v 1.9 2003/05/13 01:56:32 www Exp $ +# $Id: lonuploadedacc.pm,v 1.10 2004/02/11 00:10:02 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,7 +43,7 @@ package Apache::lonuploadedacc; # H now must ask S if token is valid, uses S's lond-command tokenauthuserfile use strict; -use Apache::Constants qw(:common); +use Apache::Constants qw(:common :http); use Apache::lonnet(); sub handler { @@ -58,9 +58,11 @@ sub handler { $remoteserver); if ($reply eq 'ok') { return OK; + } elsif ($reply eq 'con_lost' || $reply eq 'no_such_host') { + &Apache::lonnet::logthis("Server unavailable for userfile access $uname at $udom for $ufile with $remoteserver token $ENV{'form.token'}: $reply"); + return HTTP_SERVICE_UNAVAILABLE; } else { - &Apache::lonnet::logthis( -"Refused userfile access $uname at $udom for $ufile with $remoteserver token $ENV{'form.token'}: $reply"); + &Apache::lonnet::logthis("Refused userfile access $uname at $udom for $ufile with $remoteserver token $ENV{'form.token'}: $reply"); return FORBIDDEN; } }