--- loncom/auth/lonuploadedacc.pm 2003/05/12 21:22:57 1.8 +++ 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.8 2003/05/12 21:22:57 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 { @@ -57,11 +57,12 @@ sub handler { $udom.'/'.$uname.'/'.$ufile.':'.$ENV{'form.token'}, $remoteserver); if ($reply eq 'ok') { - $ENV{'request.state'}='uploaded'; 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; } }