version 1.137, 2011/08/09 01:35:31
|
version 1.139, 2012/08/21 17:51:58
|
Line 156 sub get_posted_cgi {
|
Line 156 sub get_posted_cgi {
|
for ($i=0;$i<=$#lines;$i++) { |
for ($i=0;$i<=$#lines;$i++) { |
if ($lines[$i]=~/^--\Q$contentsep\E/) { |
if ($lines[$i]=~/^--\Q$contentsep\E/) { |
if ($name) { |
if ($name) { |
$value=~s/[\r\n]+$//; |
chomp($value); |
|
if (($r->uri eq '/adm/portfolio') && |
|
($name eq 'uploaddoc')) { |
|
if (length($value) == 1) { |
|
$value=~s/[\r\n]$//; |
|
} |
|
} |
if (ref($fields) eq 'ARRAY') { |
if (ref($fields) eq 'ARRAY') { |
next if (!grep(/^\Q$name\E$/,@{$fields})); |
next if (!grep(/^\Q$name\E$/,@{$fields})); |
} |
} |
Line 438 sub handler {
|
Line 444 sub handler {
|
|
|
# ------------------------------------------------------ Check if load balancer |
# ------------------------------------------------------ Check if load balancer |
|
|
($is_balancer,$otherserver) = |
my $checkexempt; |
&Apache::lonnet::check_loadbalancing($env{'user.name'}, |
if ($env{'user.loadbalexempt'} eq $r->dir_config('lonHostID')) { |
$env{'user.domain'}); |
if ($env{'user.loadbalcheck.time'} + 600 > time) { |
|
$checkexempt = 1; |
|
} |
|
} |
|
unless ($checkexempt) { |
|
($is_balancer,$otherserver) = |
|
&Apache::lonnet::check_loadbalancing($env{'user.name'}, |
|
$env{'user.domain'}); |
|
} |
if ($is_balancer) { |
if ($is_balancer) { |
$r->set_handlers('PerlResponseHandler'=> |
$r->set_handlers('PerlResponseHandler'=> |
[\&Apache::switchserver::handler]); |
[\&Apache::switchserver::handler]); |