conns debug only in http10.pm - why?
conns debug only in http10.pm - why?
am 03.05.2006 15:35:28 von Peter
I just discovered that the conns level debugging (connection data output)
only works by setting PERL_LWP_USE_HTTP_10. Ever since the introduction
of http10.pm (which I presume to be the former http.pm), the http.pm (in
LWP/Protocol) has only one call to LWP::Debug::conns, and it is commented
out.
I don't understand how this has been this way for years without anyone
saying anything anywhere I can find it with Google. Am I missing
something?
(OTOH, it has taken *me* years to have another reason to use conns level
debugging...)
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
RE: conns debug only in http10.pm - why?
am 04.05.2006 15:40:22 von David.Worenklein
Your google skills are lacking :-)
http://wwwnntpperl=
org/group/perllibwww/4837
-----Origin al Message-----=
From: Peter Scott [mailto:Peter@PSDTcom]
Sent: Wednesday, Ma=
y 03, 2006 9:35 AM
To: libwww@perlorg
Subject: conns debug onl=
y in http10pm - why?
I just discovered that the conns level d=
ebugging (connection data
output)
only works by setting PERL_LWP_=
USE_HTTP_10 Ever since the introduction
of http10pm (which I pr=
esume to be the former httppm), the httppm (in
LWP/Protocol) has=
only one call to LWP::Debug::conns, and it is
commented
out=
I don't understand how this has been this way for years without=
anyone
saying anything anywhere I can find it with Google Am I mi=
ssing
something?
(OTOH, it has taken *me* years to have ano=
ther reason to use conns level
debugging..)
-- =0D=
=0APeter Scott
http://wwwperlmediccom/
http://wwwp erldeb=
uggedcom/
------------------ ---------------=
--------
********************************************** ***************=
******
*
This e-mail is intended only for the addressee nam=
ed above.
=0AAs this e-mail may contain confidential or privileged info=
rmation,
if you are not the named addressee, you are not authorized=0D=
=0Ato retain, read, copy or disseminate this message or any part of
it=
.
=0A********************************************* ***************=
*******
*
RE: conns debug only in http10.pm - why?
am 04.05.2006 18:25:52 von Peter
On Thu, 04 May 2006 09:40:22 -0400, Worenklein, David, GCM wrote:
> Your google skills are lacking. :-)
>
> http://www.nntp.perl.org/group/perl.libwww/4837
I think you had a certain advantage :-)
(And Google's cache of the group doesn't include that message...
can't find it via the web either...)
> From: Peter Scott [mailto:Peter@PSDT.com]
> I just discovered that the conns level debugging (connection data
> output) only works by setting PERL_LWP_USE_HTTP_10. Ever since the
> introduction of http10.pm (which I presume to be the former http.pm),
> the http.pm (in LWP/Protocol) has only one call to LWP::Debug::conns,
> and it is commented out.
So since it has been... a while... should I submit a doc patch saying
to set PERL_LWP_USE_HTTP_10, or continue being patient?
> I don't understand how this has been this way for years without anyone
> saying anything anywhere I can find it with Google. Am I missing
> something?
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
Re: conns debug only in http10.pm - why?
am 04.05.2006 20:03:22 von gisle
Peter Scott writes:
> > From: Peter Scott [mailto:Peter@PSDT.com]
> > I just discovered that the conns level debugging (connection data
> > output) only works by setting PERL_LWP_USE_HTTP_10. Ever since the
> > introduction of http10.pm (which I presume to be the former http.pm),
> > the http.pm (in LWP/Protocol) has only one call to LWP::Debug::conns,
> > and it is commented out.
>
> So since it has been... a while... should I submit a doc patch saying
> to set PERL_LWP_USE_HTTP_10, or continue being patient?
Or just use Ethereal[1] or a similar network sniffer program. That's
what I currently use and the main reason I have not bothered with
conns() calls for any recent code. They are not completely free for
those that don't try to turn on this debugging either, so I would
prefer to leave it like this. A doc patch will be welcomed.
Regards,
Gisle
[1] http://www.ethereal.com/
RE: conns debug only in http10.pm - why?
am 04.05.2006 20:07:18 von David.Worenklein
Ethereal will not, I believe, work with HTTPS.
=0A-----Orig=
inal Message-----
From: Gisle Aas [mailto:gisle@ActiveStatecom] =0D=
=0ASent: Thursday, May 04, 2006 2:03 PM
To: Peter Scott
Cc: libww=
w@perlorg; Worenklein, David, GCM
Subject: Re: conns debug only in =
http10pm - why?
Peter Scott writes:
=
> > From: Peter Scott [mailto:Peter@PSDTcom]
> > I just disc=
overed that the conns level debugging (connection data
> > output) onl=
y works by setting PERL_LWP_USE_HTTP_10 Ever since the
> > introdu=
ction of http10pm (which I presume to be the former
httppm),=0D=
=0A> > the httppm (in LWP/Protocol) has only one call to
LWP::Debug=
::conns,
> > and it is commented out.
=0A>
> So since it has=
been.. a while.. should I submit a doc patch saying
> =
to set PERL_LWP_USE_HTTP_10, or continue being patient?
Or just =
use Ethereal[1] or a similar network sniffer program That's
what I=
currently use and the main reason I have not bothered with
conns() ca=
lls for any recent code They are not completely free for
those tha=
t don't try to turn on this debugging either, so I would
prefer to lea=
ve it like this A doc patch will be welcomed.
=0ARegards,=0D=
=0AGisle
[1] http://wwwetherealcom/
=0D=
=0A-----------------------------------------
**** ***************=
************************************************
*=0D=0 A
This e-m=
ail is intended only for the addressee named above.
=0AAs this e-mail m=
ay contain confidential or privileged information,
if you are not the =
named addressee, you are not authorized
to retain, read, copy or disse=
minate this message or any part of
it.
=0A******************=
*************************************************
*=0D= 0A
Re: conns debug only in http10.pm - why?
am 04.05.2006 20:42:32 von gisle
> Ethereal will not, I believe, work with HTTPS.
True. This show another approach to connection level debugging that
can easily be made to work for https as well.
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new(keep_alive => 1, cookie_jar => {});
if ($ENV{LWP_DEBUG}) {
require Data::Dump;
package LWP::Protocol::http::Socket;
no strict 'refs';
*{"syswrite"} = sub {
my $self = shift;
my $n = $self->SUPER::syswrite(@_);
print "==> ", Data::Dump::dump("".substr($_[0], 0, $n)), "\n" if $n;
return $n;
};
*{"sysread"} = sub {
my $self = shift;
my $n = $self->SUPER::sysread(@_);
print "<== ", Data::Dump::dump($_[0]), "\n" if $n;
return $n;
};
}
# make request
my $res = $ua->get("http://www.google.com");
print $res->status_line, "\n";
Re: conns debug only in http10.pm - why?
am 04.05.2006 21:20:20 von Peter
On Thu, 04 May 2006 11:03:22 -0700, Gisle Aas wrote:
> Or just use Ethereal or a similar network sniffer program. That's
> what I currently use and the main reason I have not bothered with
> conns() calls for any recent code. They are not completely free for
> those that don't try to turn on this debugging either, so I would
> prefer to leave it like this.
An extra subroutine call, hash lookup, and boolean comparison per read()
and write() is onerous?
The debug-conns interface is appealingly clean. Can we save it?
--
Peter Scott
Re: conns debug only in http10.pm - why?
am 05.05.2006 10:25:11 von gisle
Peter Scott writes:
> On Thu, 04 May 2006 11:03:22 -0700, Gisle Aas wrote:
> > Or just use Ethereal or a similar network sniffer program. That's
> > what I currently use and the main reason I have not bothered with
> > conns() calls for any recent code. They are not completely free for
> > those that don't try to turn on this debugging either, so I would
> > prefer to leave it like this.
>
> An extra subroutine call, hash lookup, and boolean comparison per read()
> and write() is onerous?
I think it is for a feature I never use and which none has complained
about gone missing in the 5 years since the the HTTP/1.1 protocol
module became the default.
> The debug-conns interface is appealingly clean. Can we save it?
I hope not :)
--Gisle
RE: conns debug only in http10.pm - why?
am 05.05.2006 18:07:57 von David.Worenklein
I complained Now, to debug, I have to step through the code and do a=0D=
=0Abunch of prints And if I'm too slow, my connection times out.
=
=0A-----Original Message-----
From: Gisle Aas [mailto:gisle@Acti=
veStatecom]
Sent: Friday, May 05, 2006 4:25 AM
To: Peter Scot=
t
Cc: libwww@perlorg
Subject: Re: conns debug only in http10=
pm - why?
Peter Scott writes:
>=
On Thu, 04 May 2006 11:03:22 -0700, Gisle Aas wrote:
> > Or just use =
Ethereal or a similar network sniffer program That's
> > what I cu=
rrently use and the main reason I have not bothered with
> > conns() c=
alls for any recent code They are not completely free for
> > thos=
e that don't try to turn on this debugging either, so I would
> > pref=
er to leave it like this
>
> An extra subroutine call, hash=
lookup, and boolean comparison per
read()
> and write() is onero=
us?
I think it is for a feature I never use and which none has c=
omplained
about gone missing in the 5 years since the the HTTP/11 p=
rotocol
module became the default.
=0A> The debug-conns inte=
rface is appealingly clean Can we save it?
I hope not :)=0D=
=0A--Gisle
-------------------- ---------------=
------
************************************************ ***************=
****
*
This e-mail is intended only for the addressee named=
above.
=0AAs this e-mail may contain confidential or privileged inform=
ation,
if you are not the named addressee, you are not authorized=0D=
=0Ato retain, read, copy or disseminate this message or any part of
it=
.
=0A********************************************* ***************=
*******
*