summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-04-20 14:47:49 +0000
committerNorbert Preining <preining@logic.at>2017-04-20 14:47:49 +0000
commite016ffde13260cb8ac2b75bca1f3d3bb7e2250f9 (patch)
tree5e57d6e46c7ab32d9dcecf89d538307b41f14f56 /Master/tlpkg
parent41ca4e53eb135aff20a0eba4cffdb2cfb65e10e5 (diff)
try to support https, too
git-svn-id: svn://tug.org/texlive/trunk@43940 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm4
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm12
2 files changed, 8 insertions, 8 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index bc1adef0249..96012298ae4 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -276,7 +276,7 @@ sub from_file {
my $is_verified = 0;
# do media detection
my $rootpath = $self->root;
- if ($rootpath =~ m,http://|ftp://,) {
+ if ($rootpath =~ m,https?://|ftp://,) {
$media = 'NET';
} else {
if ($rootpath =~ m,file://*(.*)$,) {
@@ -299,7 +299,7 @@ sub from_file {
$self->{'media'} = $media;
#
# actually load the TLPDB
- if ($path =~ m;^((http|ftp)://|file:\/\/*);) {
+ if ($path =~ m;^((https?|ftp)://|file:\/\/*);) {
debug("TLPDB.pm: trying to initialize from $path\n");
# now $xzfh filehandle is open, the file created
# TLUtils::download_file will just overwrite what is there
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 6f25d5868e9..565d1146432 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1665,7 +1665,7 @@ sub _do_postaction_shortcut {
$cmd =~ s!^TEXDIR/!$texdir/!;
# $cmd can be an URL, in which case we do NOT want to convert it to
# w32 paths!
- if ($cmd !~ m!^\s*(http://|ftp://)!) {
+ if ($cmd !~ m!^\s*(https?://|ftp://)!) {
if (!(-e $cmd) or !(-r $cmd)) {
tlwarn("Target of shortcut action does not exist: $cmd\n")
if $cmd =~ /\.(exe|bat|cmd)$/i;
@@ -2084,7 +2084,7 @@ sub unpack {
$xzfile_quote = "\"$xzfile\"";
$tarfile_quote = "\"$tarfile\"";
$target_quote = "\"$target\"";
- if ($what =~ m,^(http|ftp)://,) {
+ if ($what =~ m,^(https?|ftp)://,) {
# we are installing from the NET
# check for the presence of $what in $tempdir
if (-r $xzfile) {
@@ -2442,7 +2442,7 @@ sub download_file {
return 0;
}
}
- if ($relpath =~ /^(http|ftp):\/\//) {
+ if ($relpath =~ /^(https?|ftp):\/\//) {
$url = $relpath;
} else {
$url = "$TeXLiveURL/$relpath";
@@ -3552,7 +3552,7 @@ sub give_ctan_mirror_base {
return $backbone[int(rand($#backbone + 1))];
}
- if ($mirror =~ m!^http://!) { # if http mirror, assume good and return.
+ if ($mirror =~ m!^https?://!) { # if http mirror, assume good and return.
return $mirror;
}
@@ -3567,7 +3567,7 @@ sub give_ctan_mirror_base {
for (my $try = 1; $try <= $max_mirror_trial; $try++) {
my $m = query_ctan_mirror();
debug("querying mirror, got " . (defined($m) ? $m : "(nothing)") . "\n");
- if (defined($m) && $m =~ m!^http://!) {
+ if (defined($m) && $m =~ m!^https?://!) {
return $m; # got http this time, assume ok.
}
# sleep to make mirror happy, but only if we are not ready to return
@@ -3670,7 +3670,7 @@ Returns the local file name if succeeded, otherwise undef.
sub download_to_temp_or_file {
my $url = shift;
my ($url_fh, $url_file);
- if ($url =~ m,^(http|ftp|file)://,) {
+ if ($url =~ m,^(https?|ftp|file)://,) {
($url_fh, $url_file) = tl_tmpfile();
# now $url_fh filehandle is open, the file created
# TLUtils::download_file will just overwrite what is there