Subject: | news response "Server" header with leafnode 2 |
Date: | Sun, 29 Nov 2009 08:59:25 +1100 |
To: | bug-libwww-perl [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
With debian packaged libwww-perl 5.834 and perl 5.10.1, the program
foo.pl below prints
2.0.0.alpha20070602a, pleased to meet you!
on a leafnode 2 news server, where I hoped it would have the name
"Leafnode" in there.
The string from $nntp->message, after Net::NNTP does "MODE READER", is
Leafnode 2.0.0.alpha20070602a, pleased to meet you!
but I see LWP::Protocol::nntp chops off the first word. Is there a
reason for that? Perhaps it could only strip known superfluous first
words, in the interests of not losing information.
use strict;
use warnings;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $resp = $ua->head('news://localhost/comp.lang.perl.misc');
my $server = $resp->header('Server');
print $server,"\n";