libwww-perl / libwww-perl/Net-HTTP
version 6.07 does not work with IO::Socket::INET6 [rt.cpan.org #98306]
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 20
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Migrated from rt.cpan.org#98306 (status was 'new')
Requestors:
- Thomas.Eckardt@thockar.com
From thomas.eckardt@thockar.com on 2014-08-25 09:05:24:
- Perl version independend
- OS independend
This happens 100% on systems which supports IPv6 but has not a bound IPv6
address except localhost (::1) and on systems without any IPv6 support.
This was not verfied on a system with fully configured IPv6.
If IO::Socket::INET6 is installed but IO::Socket::IP is not - even the
make tests are failing and the module is no longer working anymore.
If IO::Socket::INET6 is uninstalled, the module is working fine in any
case.
This is related to the changes 6.06 -> 6.07
$VERSION = "6.07";
unless ($SOCKET_CLASS) {
# Try several, in order of capability and preference
if (eval { require IO::Socket::IP }) {
$SOCKET_CLASS = "IO::Socket::IP"; # IPv4+IPv6
} elsif (eval { require IO::Socket::INET6 }) {
$SOCKET_CLASS = "IO::Socket::INET6"; # IPv4+IPv6
} elsif (eval { require IO::Socket::INET }) {
$SOCKET_CLASS = "IO::Socket::INET"; # IPv4 only
} else {
require IO::Socket;
$SOCKET_CLASS = "IO::Socket::INET";
}
}
This is the dmake output from windows
c:\Perl\cpan\build\Net-HTTP-6.07>dmake test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-MTest::Harness" "-e"
"undef *Test::Harness::Switches; test_harness(0,blib\lib', 'blib\arch')"
t/*.tt/apache-https.t .. print() on unopened filehandle GEN1 at
C:/Perl/lib/IO/Handle.pm line 472.
sysread() on unopened filehandle GEN1 at C:/Perl/lib/IO/Handle.pm line
465.
Status read failed: Bad file descriptor at
C:\Perl\cpan\build\Net-HTTP-6.07\blib\lib/Net/HTTP/Methods.pm line 276.
t/apache-https.t .. Dubious, test returned 9 (wstat 2304, 0x900)
Failed 8/8 subtests
t/apache.t ........ print() on unopened filehandle GEN1 at
C:/Perl/lib/IO/Handle.pm line 417.
sysread() on unopened filehandle GEN1 at C:/Perl/lib/IO/Handle.pm line
465.
Status read failed: Bad file descriptor at
C:\Perl\cpan\build\Net-HTTP-6.07\blib\lib/Net/HTTP/Methods.pm line 276.
t/apache.t ........ Dubious, test returned 9 (wstat 2304, 0x900)
Failed 8/8 subtests
t/http-nb.t ....... skipped: This test doesn't work on Windows
t/http.t .......... ok
Test Summary Report
-------------------
t/apache-https.t (Wstat: 2304 Tests: 0 Failed: 0)
Non-zero exit status: 9
Parse errors: Bad plan. You planned 8 tests but ran 0.
t/apache.t (Wstat: 2304 Tests: 0 Failed: 0)
Non-zero exit status: 9
Parse errors: Bad plan. You planned 8 tests but ran 0.
Files=4, Tests=37, 4 wallclock secs ( 0.09 usr + 0.06 sys = 0.16 CPU)
Result: FAIL
Failed 2/4 test programs. 0/37 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
It would be nice to have an option to preselect the $SOCKET_CLASS to use
at module load time, at least before the call to Net::HTTP->new() or as an
option in this call.
Now, setting $Net::HTTP::SOCKET_CLASS to any value before 'use Net::HTTP'
or 'require Net::HTTP' is useless, changing it after 'use' or 'require'
does not change @Net::HTTP::ISA - these variables are all not exported.
Thomas
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally
privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no
known virus in this email!
*******************************************************
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the socket-selection logic in Net::HTTP and the failure reported at Net/HTTP/Methods.pm line 276. Run t/apache.t and t/apache-https.t with IO::Socket::INET6 installed but IO::Socket::IP absent, including the Windows failure context. Done means the affected configurations no longer fail and the requested socket-class selection behavior is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100