Call sockhostname method on correct class object (bug #1578026)

This commit is contained in:
Jitka Plesnikova 2018-05-15 15:03:42 +02:00
parent 0604547e08
commit d592f9a5e0
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up HTTP-Daemon-6.01/lib/HTTP/Daemon.pm.orig HTTP-Daemon-6.01/lib/HTTP/Daemon.pm
--- HTTP-Daemon-6.01/lib/HTTP/Daemon.pm.orig 2018-05-15 13:26:53.449652641 +0200
+++ HTTP-Daemon-6.01/lib/HTTP/Daemon.pm 2018-05-15 13:28:14.239205445 +0200
@@ -61,7 +61,7 @@ sub url
$url .= '[' . inet_ntop(AF_INET6, $addr) . ']';
}
else {
- my $host = $addr->sockhostname;
+ my $host = $self->sockhostname;
if (!defined $host) {
if (sockaddr_family($addr) eq AF_INET6) {
$host = '[' . inet_ntop(AF_INET6, $addr) . ']';

View File

@ -1,6 +1,6 @@
Name: perl-HTTP-Daemon
Version: 6.01
Release: 21%{?dist}
Release: 22%{?dist}
Summary: Simple HTTP server class
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/HTTP-Daemon/
@ -11,6 +11,9 @@ Patch0: HTTP-Daemon-6.01-Add-IPv6-support.patch
# Accept undefined and empty-string LocalAddr as IO::Socket::INET does,
# CPAN RT#91699, CPAN RT#123069
Patch1: HTTP-Daemon-6.01-Handle-undef-and-empty-LocalAddr.patch
# Call "sockhostname" method on class object instead of binary string
# bug #1578026, CPAN RT#125242
Patch2: HTTP-Daemon-6.01-Call-sockhostname-on-class-object.patch
BuildArch: noarch
BuildRequires: make
BuildRequires: perl-generators
@ -59,6 +62,7 @@ IO::Socket::IP, so you can perform socket operations directly on it too.
%setup -q -n HTTP-Daemon-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
@ -77,6 +81,9 @@ make test
%{_mandir}/man3/*
%changelog
* Tue May 15 2018 Jitka Plesnikova <jplesnik@redhat.com> - 6.01-22
- Call "sockhostname" method on correct class object (bug #1578026)
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.01-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild