[LON-CAPA-cvs] cvs: rat / map.pm loncom/interface londocs.pm
raeburn
raeburn@source.lon-capa.org
Thu, 12 Feb 2009 11:35:10 -0000
raeburn Thu Feb 12 11:35:10 2009 EDT
Modified files:
/loncom/interface londocs.pm
/rat map.pm
Log:
- When using external resources from a SSL web server, don't strip out the https://
part - otherwise constructed link (e.g., adm/wrapper/ext/example.com) is without any indication that a site uses https.
- In sequence file src is http://https:// ....
- Remove the surplus http:// prefix when generating Edit link etc.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.339 loncom/interface/londocs.pm:1.340
--- loncom/interface/londocs.pm:1.339 Tue Feb 10 14:23:18 2009
+++ loncom/interface/londocs.pm Thu Feb 12 11:35:07 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.339 2009/02/10 14:23:18 ehlerst Exp $
+# $Id: londocs.pm,v 1.340 2009/02/12 11:35:07 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1899,6 +1899,7 @@
}
my $orig_url = $url;
+ $orig_url=~s{http(:|:)//https(:|:)//}{https$2//};
my $external = ($url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/});
if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) {
my $symb=&Apache::lonnet::symbclean(
Index: rat/map.pm
diff -u rat/map.pm:1.12 rat/map.pm:1.13
--- rat/map.pm:1.12 Fri Dec 19 03:49:56 2008
+++ rat/map.pm Thu Feb 12 11:35:10 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# routines for modyfing .sequence and .page files
#
-# $Id: map.pm,v 1.12 2008/12/19 03:49:56 raeburn Exp $
+# $Id: map.pm,v 1.13 2009/02/12 11:35:10 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -357,7 +357,7 @@
$output.='<&>objcont<:>'.$i.'<:>'.$zombies[$i];
}
}
- $output=~s/https?\&colon\;\/\///g;
+ $output=~s/http\&colon\;\/\///g;
$env{'form.output'}=$output;
return &loadmap($fn,&savemap($fn,''));
}
@@ -616,8 +616,8 @@
}
$comp[1].='" external="true';
} else {
- if ($comp[1]=~/^https?\:\/\//) {
- $comp[1]=~s/^https?\:\/\/[^\/]*\//\//;
+ if ($comp[1]=~/^http\:\/\//) {
+ $comp[1]=~s/^http\:\/\/[^\/]*\//\//;
}
}
$outstr.='<resource id="'.$parts[1].'" src="'