[LON-CAPA-cvs] cvs: loncom /publisher lonupload.pm
raeburn
raeburn@source.lon-capa.org
Fri, 19 Dec 2008 03:57:24 -0000
raeburn Fri Dec 19 03:57:24 2008 EDT
Modified files:
/loncom/publisher lonupload.pm
Log:
- Regular Expression for both http and https.
Index: loncom/publisher/lonupload.pm
diff -u loncom/publisher/lonupload.pm:1.42 loncom/publisher/lonupload.pm:1.43
--- loncom/publisher/lonupload.pm:1.42 Fri Dec 12 02:32:27 2008
+++ loncom/publisher/lonupload.pm Fri Dec 19 03:57:24 2008
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Handler to upload files into construction space
#
-# $Id: lonupload.pm,v 1.42 2008/12/12 02:32:27 raeburn Exp $
+# $Id: lonupload.pm,v 1.43 2008/12/19 03:57:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -421,7 +421,7 @@
my $fn;
if ($env{'form.filename'}) {
$fn=$env{'form.filename'};
- $fn=~s/^http\:\/\/[^\/]+\///;
+ $fn=~s/^https?\:\/\/[^\/]+\///;
$fn=~s/^\///;
$fn=~s{(~|priv/)($LONCAPA::username_re)}{};
$fn=~s/\/+/\//g;