Skip Menu |

This queue is for tickets about the Net-HTTP CPAN distribution.

Report information
The Basics
Id: 72790
Status: resolved
Priority: 0/
Queue: Net-HTTP

People
Owner: Nobody in particular
Requestors: HINDMARSH [...] cpan.org
Cc: Ashley.Hindmarsh [...] bbc.co.uk
AdminCc:

Bug Information
Severity: Important
Broken in: 6.02
Fixed in: (no value)



CC: ashley.hindmarsh [...] bbc.co.uk
Subject: Failing with Net::HTTP
Ref - RT#72580 "I just removed it in commit 208a2e384a176237. We'll se if anybody complains." It seems that it breaks pretty quickly if Net::SSL is required. Sample code: use Net::SSL; $ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS}="Net::SSL"; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $res = $ua->get('https://foo.com/bar'); read failed: at /home/ashley/ms5_lib_20111014/lib/perl5/Net/HTTP/Methods.pm line 256 at /home/ashley/ms5_lib_20111014/lib/perl5/i686-linux-gnu-thread-multi/Net/SSL.pm line 211 We can't switch to IO::Socket::SSL - it doesn't handle our PKCS certs, or our proxy.
From: ppisar [...] redhat.com
We hit problem with chunked HTTPS response. GETting <https://bugzilla.redhat.com/show_bug.cgi?id=1> results in truncated body. Net::HTTP croak about mallformed chunk is added into headers but no error is reported to LWP::UserAgent. Actually the response is valid and fully parseble by Net::HTTP if carried on plain TCP. I think IO::Socket::SSL truncates or splits the response data chunk decoder does not expect it. See for more details (https://bugzilla.redhat.com/show_bug.cgi?id=768394).
I stumbled on this bug myself. When I took ppisar's suggestion of reverting the change in RT#72580, the problem goes away. I'm running perl-5.14.2, built via perlbrew on Dec 27, 2011 (with - Dusethreads and -Dnoextensions=ODB_File) on an old CentOS 5.2 server with module versions libwww-perl 6.02 and IO::Socket::SSL 1.53. Let me know if I can provide any other details that would be helpful. -- Andy
I've restored the blocking override for Net::SSL in <https://github.com/gisle/libwww-perl/commit/6049e9d9eb2e22693053ad2af5ddba2b6824ac66>. IO::Socket::SSL is supposed to handle blocking correctly so I need to investigate what goes wrong in that case some more.