Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 40796
Status: rejected
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: schwern [...] pobox.com
Cc:
AdminCc:

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



Subject: Add connection debugging for http/https
Date: Sun, 09 Nov 2008 20:21:13 -0800
To: bug-libwww-perl [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
While debugging a problem with WWW::Mechanize and an https connection I tried "use LWP::Debug qw(+conns)" to trace the requests going back and forth but got nothing. The problem is that LWP::Protocol::http is missing the necessary conns() calls. Here's a patch. http10.pm has them, whatever that is. --- lib/LWP/Protocol/http.pm +++ lib/LWP/Protocol/http.pm @@ -203,6 +203,7 @@ sub request #print "------\n$req_buf\n------\n"; if (!$has_content || $write_wait || $has_content > 8*1024) { + LWP::Debug::conns($req_buf); do { # Since this just writes out the header block it should almost # always succeed to send the whole buffer in a single write call. @@ -320,6 +321,7 @@ sub request } } if (defined($wbits) && $wbits =~ /[^\0]/) { + LWP::Debug::conns($$wbuf); my $n = $socket->syswrite($$wbuf, length($$wbuf), $woffset); unless (defined $n) { die "write failed: $!" unless $!{EINTR} || $!{EAGAIN}; -- E: "Would you want to maintain a 5000 line Perl program?" d: "Why would you write a 5000 line program?"
LWP::Debug has been deprecated.