[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Fri Feb 8 11:12:10 EST 2013


raeburn		Fri Feb  8 16:12:10 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - For 2.11.
    - Backport 1.1212, 1.1213, 1.1214
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.17 loncom/lonnet/perl/lonnet.pm:1.1172.2.18
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.17	Sat Feb  2 03:30:24 2013
+++ loncom/lonnet/perl/lonnet.pm	Fri Feb  8 16:12:10 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1172.2.17 2013/02/02 03:30:24 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.18 2013/02/08 16:12:10 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -75,7 +75,7 @@
 use HTTP::Date;
 use Image::Magick;
 
-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);
 
@@ -629,6 +629,15 @@
 	|| !defined($disk_env{'user.domain'})) {
 	return undef;
     }
+
+    if (($r->user() eq '') && ($apache >= 2.4)) {
+        if ($disk_env{'user.domain'} eq $r->dir_config('lonDefDomain')) {
+            $r->user($disk_env{'user.name'});
+        } else {
+            $r->user($disk_env{'user.name'}.':'.$disk_env{'user.domain'});
+        }
+    }
+
     return $handle;
 }
 
@@ -12147,6 +12156,17 @@
 	if ($test != 0) { $_64bit=1; } else { $_64bit=0; }
 	&logthis(" Detected 64bit platform ($_64bit)");
     }
+
+    {
+        eval {
+            ($apache) =
+                (Apache2::ServerUtil::get_server_version() =~ m{Apache/(\d+\.\d+)});
+        };
+        if ($@) {
+           $apache = 1.3;
+        }
+    }
+
 }
 }
 




More information about the LON-CAPA-cvs mailing list