6.06 bump
This commit is contained in:
parent
5cb85f71e6
commit
a56dc2bb4b
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
/HTTP-Daemon-6.01.tar.gz
|
/HTTP-Daemon-6.01.tar.gz
|
||||||
/HTTP-Daemon-6.04.tar.gz
|
/HTTP-Daemon-6.04.tar.gz
|
||||||
/HTTP-Daemon-6.05.tar.gz
|
/HTTP-Daemon-6.05.tar.gz
|
||||||
|
/HTTP-Daemon-6.06.tar.gz
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
From 5c552f1ec2fa91bff64679d7252c6c154771de6c Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Wed, 23 May 2018 17:31:42 +0200
|
|
||||||
Subject: [PATCH] Format unresolvable specific socket addresses correctly
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
It seems that IO::Socket::IP::sockhostname() formats unresolvable
|
|
||||||
addresses. However, IPv6 numerical addresses must be properly
|
|
||||||
delimited by brackets:
|
|
||||||
|
|
||||||
$ perl -Ilib -MHTTP::Daemon -e '$d=HTTP::Daemon->new(LocalAddr=>q{::2}) or die; print $d->url, qq{\n}'
|
|
||||||
http://::2:52153/
|
|
||||||
|
|
||||||
And a zone seperator must be URI-quoted:
|
|
||||||
|
|
||||||
$ perl -Ilib -MHTTP::Daemon -e '$d=HTTP::Daemon->new(LocalAddr=>q{fe80::250:54ff:fe00:f15%ens3}) or die; print $d->url, qq{\n}'
|
|
||||||
http://fe80::250:54ff:fe00:f15%ens3:57797/
|
|
||||||
|
|
||||||
This patch fixes these two formatting issues.
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
lib/HTTP/Daemon.pm | 12 ++++++++++++
|
|
||||||
1 file changed, 12 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/lib/HTTP/Daemon.pm b/lib/HTTP/Daemon.pm
|
|
||||||
index 8620ffa..13d677f 100644
|
|
||||||
--- a/lib/HTTP/Daemon.pm
|
|
||||||
+++ b/lib/HTTP/Daemon.pm
|
|
||||||
@@ -62,6 +62,18 @@ sub url {
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
my $host = $self->sockhostname;
|
|
||||||
+ # sockhostname() seems to return a stringified IP address if not
|
|
||||||
+ # resolvable. Then quote it for a port separator and an IPv6 zone
|
|
||||||
+ # separator. But be paranoid for a case when it already contains
|
|
||||||
+ # a bracket.
|
|
||||||
+ if (defined $host and $host =~ /:/) {
|
|
||||||
+ if ($host =~ /[\[\]]/) {
|
|
||||||
+ $host = undef;
|
|
||||||
+ } else {
|
|
||||||
+ $host =~ s/%/%25/g;
|
|
||||||
+ $host = '[' . $host . ']';
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
if (!defined $host) {
|
|
||||||
my $family = sockaddr_family($self->sockname);
|
|
||||||
if ($family && $family == AF_INET6) {
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
From 3c6d374c2deb04e4304c298db06c1cda9d4c1d7a Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Mon, 18 Sep 2017 15:21:16 +0200
|
|
||||||
Subject: [PATCH] Handle undef and empty LocalAddr
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
IO::Socket::INET interprets undefined and empty string LocalAddr
|
|
||||||
arguments as an unspecified address while IO::Socket::IP returns an
|
|
||||||
error. This seems to be one of the differences between the two
|
|
||||||
Socket implementations. Recent IO::Socket::IP (0.39) accepts undefined
|
|
||||||
value, but still bail outs on an empty string:
|
|
||||||
|
|
||||||
$ perl -Ilib -MHTTP::Daemon -e '$d=HTTP::Daemon->new(LocalAddr=>undef) or die; print $d->url, qq{\n}'
|
|
||||||
http://fedora-31:42587/
|
|
||||||
$ perl -Ilib -MHTTP::Daemon -e '$d=HTTP::Daemon->new(LocalAddr=>q{}) or die; print $d->url, qq{\n}'
|
|
||||||
Name or service not known ...propagated at -e line 1.
|
|
||||||
|
|
||||||
To improve compatibility, this patch adds a special handling for these
|
|
||||||
two values to be accepted as an unspecified value. Though this should
|
|
||||||
be corrected on IO::Socket:IP side probably.
|
|
||||||
|
|
||||||
CPAN RT#91699
|
|
||||||
CPAN RT#123069
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
lib/HTTP/Daemon.pm | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/lib/HTTP/Daemon.pm b/lib/HTTP/Daemon.pm
|
|
||||||
index fd8020f..8620ffa 100644
|
|
||||||
--- a/lib/HTTP/Daemon.pm
|
|
||||||
+++ b/lib/HTTP/Daemon.pm
|
|
||||||
@@ -22,6 +22,14 @@ sub new {
|
|
||||||
my ($class, %args) = @_;
|
|
||||||
$args{Listen} ||= 5;
|
|
||||||
$args{Proto} ||= 'tcp';
|
|
||||||
+ # Handle undefined or empty local address the same way as
|
|
||||||
+ # IO::Socket::INET -- use unspecified address
|
|
||||||
+ for my $key (qw(LocalAddr LocalHost)) {
|
|
||||||
+ if (exists $args{$key} &&
|
|
||||||
+ (!defined($args{$key}) || $args{$key} eq '')) {
|
|
||||||
+ delete $args{$key};
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
return $class->SUPER::new(%args);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
@ -1,19 +1,12 @@
|
|||||||
Name: perl-HTTP-Daemon
|
Name: perl-HTTP-Daemon
|
||||||
Version: 6.05
|
Version: 6.06
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Simple HTTP server class
|
Summary: Simple HTTP server class
|
||||||
License: GPL+ or Artistic
|
License: GPL+ or Artistic
|
||||||
URL: https://metacpan.org/release/HTTP-Daemon
|
URL: https://metacpan.org/release/HTTP-Daemon
|
||||||
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/HTTP-Daemon-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-%{version}.tar.gz
|
||||||
# Accept undefined and empty-string LocalAddr as IO::Socket::INET does,
|
|
||||||
# CPAN RT#91699, CPAN RT#123069,
|
|
||||||
# <https://github.com/libwww-perl/HTTP-Daemon/pull/32>
|
|
||||||
Patch0: HTTP-Daemon-6.05-Handle-undef-and-empty-LocalAddr.patch
|
|
||||||
# Fix formatting specific non-local addresses, bug #1578026, CPAN RT#125242,
|
|
||||||
# <https://github.com/libwww-perl/HTTP-Daemon/pull/32>
|
|
||||||
Patch1: HTTP-Daemon-6.05-Format-unresolvable-specific-socket-addresses-correc.patch
|
|
||||||
# Use Makefile.PL without unneeded dependencies
|
# Use Makefile.PL without unneeded dependencies
|
||||||
Patch2: HTTP-Daemon-6.04-EU-MM-is-not-deprecated.patch
|
Patch0: HTTP-Daemon-6.04-EU-MM-is-not-deprecated.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
@ -66,8 +59,6 @@ IO::Socket::IP, so you can perform socket operations directly on it too.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n HTTP-Daemon-%{version}
|
%setup -q -n HTTP-Daemon-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||||
@ -90,6 +81,9 @@ make test
|
|||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 30 2019 Petr Pisar <ppisar@redhat.com> - 6.06-1
|
||||||
|
- 6.06 bump
|
||||||
|
|
||||||
* Mon Jul 29 2019 Petr Pisar <ppisar@redhat.com> - 6.05-1
|
* Mon Jul 29 2019 Petr Pisar <ppisar@redhat.com> - 6.05-1
|
||||||
- 6.05 bump
|
- 6.05 bump
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (HTTP-Daemon-6.05.tar.gz) = 26a5dd4f215b7d3c488c414101e975db0b8f38f11c983312d3c1d89f22e9c80895d6ae3f60fd4b00b6cbea5814992ad705237848cf2c9eab40eb82cd0109b32d
|
SHA512 (HTTP-Daemon-6.06.tar.gz) = 8e6dcf4451aaa6bd5f38508a087e5bb9b7f5105e8e243d09bdd3f4be3d7009222b3d9f8e494f049b48f0caebf36f239b8bbc7b8edc805f7d32b1bbeb38431732
|
||||||
|
Loading…
Reference in New Issue
Block a user