--- loncom/publisher/lonpublisher.pm 2001/08/18 16:38:37 1.42 +++ loncom/publisher/lonpublisher.pm 2001/08/18 21:34:39 1.43 @@ -11,7 +11,7 @@ # 04/16/2001 Scott Harrison # 05/03,05/05,05/07 Gerd Kortemeyer # 05/28/2001 Scott Harrison -# 06/23,08/07,08/11,8/13,8/17 Gerd Kortemeyer +# 06/23,08/07,08/11,8/13,8/17,8/18 Gerd Kortemeyer package Apache::lonpublisher; @@ -837,6 +837,20 @@ sub handler { return OK; } +# Get query string for limited number of parameters + + map { + my ($name, $value) = split(/=/,$_); + $value =~ tr/+/ /; + $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; + if ($name eq 'filename') { + unless ($ENV{'form.'.$name}) { + $ENV{'form.'.$name}=$value; + } + } + } (split(/&/,$ENV{'QUERY_STRING'})); + + # -------------------------------------------------------------- Check filename my $fn=$ENV{'form.filename'}; @@ -868,7 +882,8 @@ sub handler { return HTTP_NOT_ACCEPTABLE; } - $fn=~s/^http\:\/\/[^\/]+\/\~(\w+)/\/home\/$1\/public_html/; + $fn=~s/^http\:\/\/[^\/]+//; + $fn=~s/^\/\~(\w+)/\/home\/$1\/public_html/; my $targetdir=''; $docroot=$r->dir_config('lonDocRoot');