diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-06-06 14:06:19 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-06-06 14:06:19 +0000 |
commit | 7ef6abd822aa4bdcae7c1da6a5e202163496a1e2 (patch) | |
tree | 4ec4e592221e94bd8de79401eeca9ea53d5cb0a8 /usr.sbin/pkg_add | |
parent | 8ca6791a1f6be7a16b2df8698c181e46b8690600 (diff) |
recognize and handle https.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index 101120f6843..179faf7b0a8 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepository.pm,v 1.42 2007/06/04 18:55:47 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.43 2007/06/06 14:06:18 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -42,6 +42,8 @@ sub new return OpenBSD::PackageRepository::FTP->_new($1); } elsif ($baseurl =~ m/^http\:(.*)$/io) { return OpenBSD::PackageRepository::HTTP->_new($1); + } elsif ($baseurl =~ m/^https\:(.*)$/io) { + return OpenBSD::PackageRepository::HTTPS->_new($1); } elsif ($baseurl =~ m/^scp\:(.*)$/io) { require OpenBSD::PackageRepository::SCP; @@ -604,6 +606,14 @@ sub list return $self->{list}; } +package OpenBSD::PackageRepository::HTTPS; +our @ISA=qw(OpenBSD::PackageRepository::HTTP); + +sub urlscheme +{ + return 'https'; +} + package OpenBSD::PackageRepository::FTP; our @ISA=qw(OpenBSD::PackageRepository::HTTPorFTP); |