r41838 - in /trunk/libwww-perl: Changes META.yml debian/changelog lib/HTTP/Date.pm lib/HTTP/Message.pm lib/LWP.pm lib/Net/HTTP.pm t/base/message.t
iulian-guest at users.alioth.debian.org
iulian-guest at users.alioth.debian.org
Fri Aug 14 20:12:14 UTC 2009
Author: iulian-guest
Date: Fri Aug 14 20:12:08 2009
New Revision: 41838
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41838
Log:
* New upstream release
* Rename libwww-perl.links to just links.
Modified:
trunk/libwww-perl/Changes
trunk/libwww-perl/META.yml
trunk/libwww-perl/debian/changelog
trunk/libwww-perl/lib/HTTP/Date.pm
trunk/libwww-perl/lib/HTTP/Message.pm
trunk/libwww-perl/lib/LWP.pm
trunk/libwww-perl/lib/Net/HTTP.pm
trunk/libwww-perl/t/base/message.t
Modified: trunk/libwww-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/Changes?rev=41838&op=diff
==============================================================================
--- trunk/libwww-perl/Changes (original)
+++ trunk/libwww-perl/Changes Fri Aug 14 20:12:08 2009
@@ -1,3 +1,17 @@
+_______________________________________________________________________________
+2009-08-13 Release 5.831
+
+
+Ville Skyttä (3):
+ Fix bzip2 content encoding/decoding.
+ send_te() doc grammar fix.
+ Document time2str() behavior with an undefined argument.
+
+Gisle Aas (1):
+ HTML::Message's content_charset trigger warnings from HTML::Parser [RT#48621]
+
+
+
_______________________________________________________________________________
2009-07-26 Release 5.830
Modified: trunk/libwww-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/META.yml?rev=41838&op=diff
==============================================================================
--- trunk/libwww-perl/META.yml (original)
+++ trunk/libwww-perl/META.yml Fri Aug 14 20:12:08 2009
@@ -1,14 +1,12 @@
--- #YAML:1.0
name: libwww-perl
-version: 5.830
+version: 5.831
abstract: The World-Wide Web library for Perl
author:
- Gisle Aas <gisle at activestate.com>
license: perl
distribution_type: module
configure_requires:
- ExtUtils::MakeMaker: 0
-build_requires:
ExtUtils::MakeMaker: 0
requires:
Compress::Zlib: 1.10
@@ -26,7 +24,7 @@
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.55_02
+generated_by: ExtUtils::MakeMaker version 6.4801
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Modified: trunk/libwww-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/debian/changelog?rev=41838&op=diff
==============================================================================
--- trunk/libwww-perl/debian/changelog (original)
+++ trunk/libwww-perl/debian/changelog Fri Aug 14 20:12:08 2009
@@ -1,3 +1,10 @@
+libwww-perl (5.831-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * Rename libwww-perl.links to just links.
+
+ -- Iulian Udrea <iulian at ubuntu.com> Fri, 14 Aug 2009 20:59:42 +0100
+
libwww-perl (5.830-1) unstable; urgency=low
[ Iulian Udrea ]
Modified: trunk/libwww-perl/lib/HTTP/Date.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/HTTP/Date.pm?rev=41838&op=diff
==============================================================================
--- trunk/libwww-perl/lib/HTTP/Date.pm (original)
+++ trunk/libwww-perl/lib/HTTP/Date.pm Fri Aug 14 20:12:08 2009
@@ -1,6 +1,6 @@
package HTTP::Date;
-$VERSION = "5.810";
+$VERSION = "5.831";
require 5.004;
require Exporter;
@@ -283,8 +283,8 @@
=item time2str( [$time] )
The time2str() function converts a machine time (seconds since epoch)
-to a string. If the function is called without an argument, it will
-use the current time.
+to a string. If the function is called without an argument or with an
+undefined argument, it will use the current time.
The string returned is in the format preferred for the HTTP protocol.
This is a fixed length subset of the format defined by RFC 1123,
Modified: trunk/libwww-perl/lib/HTTP/Message.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/HTTP/Message.pm?rev=41838&op=diff
==============================================================================
--- trunk/libwww-perl/lib/HTTP/Message.pm (original)
+++ trunk/libwww-perl/lib/HTTP/Message.pm Fri Aug 14 20:12:08 2009
@@ -2,7 +2,7 @@
use strict;
use vars qw($VERSION $AUTOLOAD);
-$VERSION = "5.828";
+$VERSION = "5.831";
require HTTP::Headers;
require Carp;
@@ -260,6 +260,7 @@
$self->eof;
}, "tagname, attr, self"],
report_tags => [qw(meta)],
+ utf8_mode => 1,
);
$p->parse($$cref);
return $charset if $charset;
@@ -311,14 +312,35 @@
}
elsif ($ce eq "x-bzip2") {
require Compress::Bzip2;
+ my $i = Compress::Bzip2::bzinflateInit() or
+ die "Can't init bzip2 inflater: $Compress::Bzip2::bzerrno";
unless ($content_ref_iscopy) {
- # memBunzip is documented to destroy its buffer argument
+ # the $i->bzinflate method is documented to destroy its
+ # buffer argument
my $copy = $$content_ref;
$content_ref = \$copy;
$content_ref_iscopy++;
}
- $content_ref = \Compress::Bzip2::memBunzip($$content_ref);
- die "Can't bunzip content" unless defined $$content_ref;
+ # TODO: operate on the ref when rt#48124 is fixed
+ my ($out, $status) = $i->bzinflate($$content_ref);
+ my $bzerr = "";
+ # TODO: drop $out definedness part when rt#48124 is fixed
+ if (!defined($out) &&
+ $status != Compress::Bzip2::BZ_STREAM_END()) {
+ if ($status == Compress::Bzip2::BZ_OK()) {
+ $self->push_header("Client-Warning" =>
+ "Content might be truncated; incomplete bzip2 stream");
+ }
+ else {
+ # something went bad, can't trust $out any more
+ $out = undef;
+ # $bzerrno has more info than $i->bzerror or $status
+ $bzerr = ": $Compress::Bzip2::bzerrno";
+ }
+ }
+ die "Can't bunzip content$bzerr" unless defined $out;
+ $content_ref = \$out;
+ $content_ref_iscopy++;
}
elsif ($ce eq "deflate") {
require Compress::Zlib;
@@ -471,7 +493,15 @@
}
elsif ($encoding eq "x-bzip2") {
require Compress::Bzip2;
- $content = Compress::Bzip2::memGzip($content);
+ my $d = Compress::Bzip2::bzdeflateInit() or
+ die "Can't init bzip2 deflater: $Compress::Bzip2::bzerrno";
+ ($content, my $status) = $d->bzdeflate($content);
+ die "Can't bzip content: $Compress::Bzip2::bzerrno"
+ unless $status == Compress::Bzip2::BZ_OK();
+ (my $rest, $status) = $d->bzclose;
+ die "Can't bzip content: $Compress::Bzip2::bzerrno"
+ unless $status == Compress::Bzip2::BZ_OK();
+ $content .= $rest if defined $rest;
}
elsif ($encoding eq "rot13") { # for the fun of it
$content =~ tr/A-Za-z/N-ZA-Mn-za-m/;
Modified: trunk/libwww-perl/lib/LWP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/LWP.pm?rev=41838&op=diff
==============================================================================
--- trunk/libwww-perl/lib/LWP.pm (original)
+++ trunk/libwww-perl/lib/LWP.pm Fri Aug 14 20:12:08 2009
@@ -1,6 +1,6 @@
package LWP;
-$VERSION = "5.830";
+$VERSION = "5.831";
sub Version { $VERSION; }
require 5.005;
Modified: trunk/libwww-perl/lib/Net/HTTP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/Net/HTTP.pm?rev=41838&op=diff
==============================================================================
--- trunk/libwww-perl/lib/Net/HTTP.pm (original)
+++ trunk/libwww-perl/lib/Net/HTTP.pm Fri Aug 14 20:12:08 2009
@@ -3,7 +3,7 @@
use strict;
use vars qw($VERSION @ISA $SOCKET_CLASS);
-$VERSION = "5.819";
+$VERSION = "5.831";
unless ($SOCKET_CLASS) {
eval { require IO::Socket::INET } || require IO::Socket;
$SOCKET_CLASS = "IO::Socket::INET";
@@ -111,7 +111,7 @@
Get/set the a value indicating if the request will be sent with a "TE"
header to indicate the transfer encodings that the server can choose to
use. If the C<Compress::Zlib> module is installed then this will
-announce that this client accept both the I<deflate> and I<gzip>
+announce that this client accepts both the I<deflate> and I<gzip>
encodings.
=item $s->http_version
Modified: trunk/libwww-perl/t/base/message.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/t/base/message.t?rev=41838&op=diff
==============================================================================
--- trunk/libwww-perl/t/base/message.t (original)
+++ trunk/libwww-perl/t/base/message.t Fri Aug 14 20:12:08 2009
@@ -3,7 +3,7 @@
use strict;
use Test qw(plan ok skip);
-plan tests => 121;
+plan tests => 124;
require HTTP::Message;
use Config qw(%Config);
@@ -477,24 +477,21 @@
);
ok($m->encode("x-bzip2"));
ok($m->header("Content-Encoding"), "x-bzip2");
- ok($m->content =~ /\0/);
+ ok($m->content =~ /^BZh.*\0/);
ok($m->decoded_content, "Hello world!");
ok($m->decode);
ok($m->content, "Hello world!");
- if (0) {
- # I prepared the following message by using bzip2 command (v1.0.4)
- # but for some reason it will not pass
$m = HTTP::Message->new([
"Content-Type" => "text/plain",
"Content-Encoding" => "x-bzip2, base64",
],
"QlpoOTFBWSZTWcvLx0QAAAHVgAAQYAAAQAYEkIAgADEAMCBoYlnQeSEMvxdyRThQkMvLx0Q=\n"
);
- $m->decode;
- $m->dump;
- }
+ ok($m->decoded_content, "Hello world!\n");
+ ok($m->decode);
+ ok($m->content, "Hello world!\n");
}
else {
- skip("Need Compress::Bzip2", undef) for 1..6;
-}
+ skip("Need Compress::Bzip2", undef) for 1..9;
+}
More information about the Pkg-perl-cvs-commits
mailing list