develooper Front page | perl.libwww | Postings from April 2001

Bug in libwww-perl-5.53

From:
Boris 'pi' Piwinger
Date:
April 11, 2001 07:13
Subject:
Bug in libwww-perl-5.53
Message ID:
3AD428EB.2E9A00E3@logic.univie.ac.at
Hi!

There is a bug in libwww since 5.51. Whenever the server response
message ends with a ), a \n is appended. Example:

[3.14@pi ~]$ cat bin/test.pl 
#!/usr/bin/perl
use LWP::UserAgent;
print "This is libwww-perl-$LWP::VERSION\n";
my$ua = new LWP::UserAgent;
my$url = "http://no.such.host/";
my$response = $ua->simple_request(HTTP::Request->new("GET",$url));
print "#".$response->message."#\n";
$url = "http://www/no.such.file";
$response = $ua->simple_request(HTTP::Request->new("GET",$url));
print "#".$response->message."#\n";
[3.14@pi ~]$ test.pl 
This is libwww-perl-5.51
#Can't connect to no.such.host:80 (Bad hostname 'no.such.host')
#
#Not Found#
[3.14@pi ~]$ test.pl 
This is libwww-perl-5.53
#Can't connect to no.such.host:80 (Bad hostname 'no.such.host')
#
#Not Found#

I guess this is a consequence of the "Avoid potential '<FILE> chunk 1'
messages at the end of the response 'message'." fix.

pi



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About