[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Thu Feb 7 08:59:15 EST 2013
raeburn Thu Feb 7 13:59:15 2013 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- Add $apache as global scalar in lonnet.pm, and only set $r->user() in
&check_for_valid_session() for Apache 2.4 or later.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1212 loncom/lonnet/perl/lonnet.pm:1.1213
--- loncom/lonnet/perl/lonnet.pm:1.1212 Tue Feb 5 21:32:49 2013
+++ loncom/lonnet/perl/lonnet.pm Thu Feb 7 13:59:14 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1212 2013/02/05 21:32:49 raeburn Exp $
+# $Id: lonnet.pm,v 1.1213 2013/02/07 13:59:14 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -78,7 +78,7 @@
use Encode;
-use vars qw(%perlvar %spareid %pr %prp $memcache %packagetab $tmpdir
+use vars qw(%perlvar %spareid %pr %prp $memcache %packagetab $tmpdir $apache
$_64bit %env %protocol %loncaparevs %serverhomeIDs %needsrelease
%managerstab);
@@ -634,7 +634,7 @@
|| !defined($disk_env{'user.domain'})) {
return undef;
}
- if ($r->user() eq '') {
+ if (($r->user() eq '') && ($apache >= 2.4)) {
if ($disk_env{'user.domain'} eq $r->dir_config('lonDefDomain')) {
$r->user($disk_env{'user.name'});
} else {
@@ -12197,6 +12197,15 @@
if ($test != 0) { $_64bit=1; } else { $_64bit=0; }
&logthis(" Detected 64bit platform ($_64bit)");
}
+ if (open(PIPE,"httpd -V 2>&1 |")) {
+ while (<PIPE>) {
+ if (m{Apache/(\d+.\d+)}) {
+ $apache = $1;
+ last;
+ }
+ }
+ close(PIPE);
+ }
}
}
More information about the LON-CAPA-cvs
mailing list