[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Thu, 30 Aug 2007 20:24:16 -0000


albertel		Thu Aug 30 16:24:16 2007 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - get IE to stop complaining about images. coming from non-secure server
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.573 loncom/interface/loncommon.pm:1.574
--- loncom/interface/loncommon.pm:1.573	Thu Aug 30 12:03:29 2007
+++ loncom/interface/loncommon.pm	Thu Aug 30 16:24:15 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.573 2007/08/30 16:03:29 raeburn Exp $
+# $Id: loncommon.pm,v 1.574 2007/08/30 20:24:15 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7375,6 +7375,14 @@
     my ($url)=@_;
     my $lonhttpd_port=$Apache::lonnet::perlvar{'lonhttpdPort'};
     if (!defined($lonhttpd_port)) { $lonhttpd_port='8080'; }
+
+    # IE doesn't like a secure page getting images from a non-secure
+    # port (when logging we haven't parsed the browser type so default
+    # back to secure
+    if ((!exists($env{'browser.type'}) || $env{'browser.type'} eq 'explorer')
+	&& $ENV{'SERVER_PORT'} == 443) {
+	return 'https://'.$ENV{'SERVER_NAME'}.$url;
+    }
     return 'http://'.$ENV{'SERVER_NAME'}.':'.$lonhttpd_port.$url;
 }