diff -Nru libhttp-lite-perl-2.42/Changes libhttp-lite-perl-2.43/Changes --- libhttp-lite-perl-2.42/Changes 2013-07-22 12:47:21.000000000 +0000 +++ libhttp-lite-perl-2.43/Changes 2014-01-29 10:38:04.000000000 +0000 @@ -1,5 +1,11 @@ Revision history for Perl module HTTP::Lite +2.43 2014-01-29 + - Directed people to HTTP::Tiny and LWP at the start of the doc + - Added links to better modules in SEE ALSO + - Added "use warnings" (!) + - Moved test.pl into t/original-tests.t + 2.42 2013-07-21 - Fixed typos reported by David Steinbrunner (thanks!) diff -Nru libhttp-lite-perl-2.42/debian/changelog libhttp-lite-perl-2.43/debian/changelog --- libhttp-lite-perl-2.42/debian/changelog 2013-10-22 17:29:39.000000000 +0000 +++ libhttp-lite-perl-2.43/debian/changelog 2014-02-17 20:10:23.000000000 +0000 @@ -1,3 +1,11 @@ +libhttp-lite-perl (2.43-1) unstable; urgency=medium + + * Team upload. + * New upstream release. + * Declare compliance with Debian Policy 3.9.5. + + -- gregor herrmann Mon, 17 Feb 2014 21:10:11 +0100 + libhttp-lite-perl (2.42-1) unstable; urgency=low * Team upload. diff -Nru libhttp-lite-perl-2.42/debian/control libhttp-lite-perl-2.43/debian/control --- libhttp-lite-perl-2.42/debian/control 2013-10-22 17:29:39.000000000 +0000 +++ libhttp-lite-perl-2.43/debian/control 2014-02-17 20:10:23.000000000 +0000 @@ -5,7 +5,7 @@ Build-Depends-Indep: perl Maintainer: Debian Perl Group Uploaders: Jotam Jr. Trejo -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Homepage: https://metacpan.org/release/HTTP-Lite/ Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libhttp-lite-perl.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libhttp-lite-perl.git diff -Nru libhttp-lite-perl-2.42/lib/HTTP/Lite.pm libhttp-lite-perl-2.43/lib/HTTP/Lite.pm --- libhttp-lite-perl-2.42/lib/HTTP/Lite.pm 2013-07-22 12:45:32.000000000 +0000 +++ libhttp-lite-perl-2.43/lib/HTTP/Lite.pm 2014-01-29 10:35:29.000000000 +0000 @@ -2,13 +2,14 @@ use 5.005; use strict; +use warnings; use Socket 1.3; use Fcntl; use Errno qw(EAGAIN); use vars qw($VERSION); BEGIN { - $VERSION = "2.42"; + $VERSION = "2.43"; } my $BLOCKSIZE = 65536; @@ -776,6 +777,9 @@ =head1 DESCRIPTION +B you should look at L or L +before using this module. + HTTP::Lite is a stand-alone lightweight HTTP/1.1 implementation for perl. It is not intended as a replacement for the fully-featured LWP module. Instead, it is intended for use in @@ -1045,12 +1049,15 @@ Roy Hooper Now co-maintained by Neil Bowers Eneilb@cpan.orgE. -This is a developer release after fixing some bugs, before doing a regular release. =head1 SEE ALSO -L -RFC 2068 - HTTP/1.1 -http://www.w3.org/ +This module (HTTP::Lite) is almost certainly not the best module for your needs. + +For most uses L is a good choice. +If you need more features, then look at L. + +You could also read this L. =head1 COPYRIGHT diff -Nru libhttp-lite-perl-2.42/MANIFEST libhttp-lite-perl-2.43/MANIFEST --- libhttp-lite-perl-2.42/MANIFEST 2012-07-10 20:47:53.000000000 +0000 +++ libhttp-lite-perl-2.43/MANIFEST 2014-01-29 10:36:23.000000000 +0000 @@ -14,6 +14,7 @@ MANIFEST This list of files META.yml README +t/original-tests.t t/data/HTTP-Lite-Tests/bigbinary.dat t/data/HTTP-Lite-Tests/bigbinary.dat.md5 t/data/HTTP-Lite-Tests/bigtest.txt @@ -28,7 +29,6 @@ t/data/HTTP-Lite-Tests/post.cgi t/data/HTTP-Lite-Tests/test.txt t/data/HTTP-Lite-Tests/unchunked.html -test.pl xt/meta.t xt/pmv.t xt/pod.t diff -Nru libhttp-lite-perl-2.42/t/original-tests.t libhttp-lite-perl-2.43/t/original-tests.t --- libhttp-lite-perl-2.42/t/original-tests.t 1970-01-01 00:00:00.000000000 +0000 +++ libhttp-lite-perl-2.43/t/original-tests.t 2014-01-29 10:30:04.000000000 +0000 @@ -0,0 +1,342 @@ +#!/usr/bin/perl + +# +# HTTP::Lite - test.pl +# +# $Id: test.pl,v 1.5 2002/06/13 04:56:30 rhooper Exp rhooper $ +# + +# Before `make install' is performed this script should be runnable with +# `make test'. After `make install' it should work as `perl test.pl' + +######################### We start with some black magic to print on failure. + +# Change 1..1 below to 1..last_test_to_print . +# (It may become useful if the test is moved to ./t subdirectory.) + +BEGIN { $| = 1; print "1..21\n"; } +END { print "not ok 1\n" unless $loaded; } +use HTTP::Lite; +$loaded = 1; + +print "ok 1\n"; + +######################### End of black magic. + +# Insert your test code below (better if it prints "ok 13" +# (correspondingly "not ok 13") depending on the success of chunk 13 +# of the test code): + +#print STDERR <; + + chomp($proxy); + $proxy = $proxy ? $proxy : "none"; + + if ( $proxy =~ /\s*'*none'*\s*/ ) { + + # print STDERR "skipping proxy testing\n"; + $skipproxy = 1; + } + +} + +$http = HTTP::Lite->new; + +#$http->{DEBUG} = 1; + +$http->http11_mode(1); + +# print "\n\n"; +$testno = 2; + +if ( !$skip ) { + + $url = "$testpath/test.txt"; + $res = $http->request($url); + print "not " if !defined($res); + print "ok $testno $url\n"; + $testno++; + $doc = $http->body; + print "not " if $doc ne "OK\n"; + print "ok $testno $url\n"; + $testno++; + + $http->reset; + $url = "http://invalidhost.thetoybox.org/"; + $res = $http->request($url); + print "not " if defined($res); + print "ok $testno $url\n"; + $testno++; + + $http->reset; + $url = "http://localhost:99999/"; + $res = $http->request($url); + print "not " if defined($res); + print "ok $testno $url\n"; + $testno++; + + $http->reset; + %vars = ( + "a" => "abc", + "b" => "hello world&", + ); + $http->prepare_post( \%vars ); + $url = "$testpath/post.cgi"; + $res = $http->request($url); + print "not " if !defined($res); + print "ok $testno $url\n"; + $testno++; + $doc = $http->body; + print "not " if $doc ne "a=abc\nb=hello world&\n"; + print "ok $testno $url\n"; + $testno++; + + $http->reset; + $url = "$testpath/chunked.cgi"; + $res = $http->request($url); + $doc = $http->body; + print "not " if length($doc) != 28; + print "ok $testno $url\n"; + $testno++; + print "not " if $doc ne "chunk1\nchunk2\nchunk3\nchunk4\n"; + print "ok $testno $url\n"; + $testno++; + + $http->reset; + $url = "$testpath/chunked2.cgi"; + $res = $http->request($url); + $doc = $http->body; + print "not " if length($doc) != 26; + print "ok $testno $url\n"; + $testno++; + print "not " if $doc ne "chunk1\nchunk2\nchunk3chunk4"; + print "ok $testno $url\n"; + $testno++; + + $http->reset; + $url = "$testpath/chunked3.cgi"; + $res = $http->request($url); + $doc = $http->body; + print "length not " if length($doc) != 34; + print "ok $testno $url\n"; + $testno++; + print "not " if $doc ne "chunk1\nchunk2\nchunk3chunk4chunk5\n\n"; + print "ok $testno $url\n"; + $testno++; + + $http->reset; + $url = "$testpath/unchunked.html"; + $res = $http->request($url); + $doc = $http->body; + print "not " if length($doc) != 33; + print "ok $testno $url\n"; + $testno++; + print "not " if $doc ne "unchunked1\nunchunked2\nunchunked3\n"; + print "ok $testno $url\n"; + $testno++; + + $http->reset; + $url = "$testpath/nonl.html"; + $res = $http->request($url); + $doc = $http->body; + print "not " if length($doc) != 17; + print "ok $testno $url\n"; + $testno++; + print "not " if $doc ne "line1\nline2\nline3"; + print "ok $testno $url\n"; + $testno++; + + $http->http11_mode(0); + $http->reset; + $url = "$testpath/nle.html"; + $res = $http->request($url); + $doc = $http->body; + print "not " if length($doc) != 19; + print "ok $testno $url\n"; + $testno++; + print "not " if $doc ne "line1\nline2\nline3\n\n"; + print "ok $testno $url\n"; + $testno++; + $http->reset; + $url = "$testpath/bigbinary.dat"; + $res = $http->request($url); + $bin = $http->body; + $http->reset; + $url = "$testpath/bigbinary.dat.md5"; + $res = $http->request($url); + chomp( $binsum = $http->body ); + eval "use Digest::MD5 qw(md5_hex);"; + + if ($@) { + print "ok $n (skipping test on this platform)\n"; + } + else { + $sum = md5_hex($bin); + print "not " if $binsum ne $sum; + print "ok $testno $url\n"; + } + $testno++; + + $http->http11_mode(1); + $http->reset; + $url = "$testpath/nle.html"; + $res = $http->request($url); + $doc = $http->body; + print "not " if length($doc) != 19; + print "ok $testno $url\n"; + $testno++; + print "not " if $doc ne "line1\nline2\nline3\n\n"; + print "ok $testno $url\n"; + $testno++; + $http->reset; + $url = "$testpath/bigbinary.dat"; + $res = $http->request($url); + $bin = $http->body; + $http->reset; + $url = "$testpath/bigbinary.dat.md5"; + $res = $http->request($url); + chomp( $binsum = $http->body ); + eval "use Digest::MD5 qw(md5_hex);"; + + if ($@) { + print "ok $n (skipping test on this platform)\n"; + } + else { + $sum = md5_hex($bin); + print "not " if $binsum ne $sum; + print "ok $testno $url\n"; + } + $testno++; + + $http->reset; + $url = "$testpath/bigtest.txt"; + $res = $http->request($url); + $bigtest = $http->body; + + $http->reset; + $url = "$testpath/chunked4.cgi"; + $res = $http->request($url); + $doc = $http->body; + print "not " if $doc ne "$bigtest$bigtest${bigtest}chunk4chunk5\n"; + print "ok $testno $url\n"; + $testno++; + + $http->reset; + $url = "$testpath/chunked5.cgi"; + $res = $http->request($url); + $doc = $http->body; + print "not " if $doc ne "$bigtest$bin${bigtest}chunk4chunk5\n"; + print "ok $testno $url\n"; + $testno++; + + # Callback test #1 - Unmodified callback + sub callback1 { + my ( $self, $dataref, $cbargs ) = @_; + $cbbytes += length($$dataref); + return $dataref; + } + + $http->reset; + $url = "$testpath/bigbinary.dat"; + $res = $http->request( $url, \&callback1 ); + $doc = $http->body; + print "not " if $doc ne $bin; + print "ok $testno $url\n"; + $testno++; + print "not " if length($bin) != $cbbytes; + print "ok $testno $url\n"; + $testno++; + + # Callback test #2 - Discard + sub callback2 { + my ( $self, $dataref, $cbargs ) = @_; + $cbbytes += length($$dataref); + return undef; + } + + $http->reset; + $url = "$testpath/bigbinary.dat"; + $res = $http->request( $url, \&callback2 ); + $doc = $http->body; + print "not " if defined($doc); + print "ok $testno $url\n"; + $testno++; + + # Callback test #3 - New callback syntax + sub callback3 { + my ( $self, $mode, $dataref, @args ) = @_; + $cbbytes += length($$dataref); + + # print STDERR "callback for $mode data is $dataref args are @args\n"; + return $dataref; + } + + $http->reset; + $url = "$testpath/bigbinary.dat"; + $http->set_callback( \&callback3, "arg1", "arg2", "arg3", ["arg4"] ); + $res = $http->request($url); + $doc = $http->body; + print "not " if $doc ne $bin; + print "ok $testno $url\n"; + $testno++; + +} +else { + for ( $n = $testno ; $n < 20 ; $n++ ) { + print "ok $n (skipping test on this platform)\n"; + } + $testno = $n; +} + +unless ( $skip || $skipproxy ) { + $http->reset; + $http->proxy($proxy); + $url = "$testpath/test.txt"; + $res = $http->request($url); + $doc = $http->body; + print "not " if length($doc) != 3; + print "ok $testno $url\n"; + $testno++; + print "not " if $doc ne "OK\n"; + print "ok $testno $url\n"; + $testno++; +} +else { + print "ok $testno (skipping test on this platform)\n"; + $testno++; + print "ok $testno (skipping test on this platform)\n"; +} diff -Nru libhttp-lite-perl-2.42/test.pl libhttp-lite-perl-2.43/test.pl --- libhttp-lite-perl-2.42/test.pl 2012-07-10 20:47:53.000000000 +0000 +++ libhttp-lite-perl-2.43/test.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,342 +0,0 @@ -#!/usr/bin/perl - -# -# HTTP::Lite - test.pl -# -# $Id: test.pl,v 1.5 2002/06/13 04:56:30 rhooper Exp rhooper $ -# - -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' - -######################### We start with some black magic to print on failure. - -# Change 1..1 below to 1..last_test_to_print . -# (It may become useful if the test is moved to ./t subdirectory.) - -BEGIN { $| = 1; print "1..27\n"; } -END { print "not ok 1\n" unless $loaded; } -use HTTP::Lite; -$loaded = 1; - -print "ok 1\n"; - -######################### End of black magic. - -# Insert your test code below (better if it prints "ok 13" -# (correspondingly "not ok 13") depending on the success of chunk 13 -# of the test code): - -#print STDERR <; - - chomp($proxy); - $proxy = $proxy ? $proxy : "none"; - - if ( $proxy =~ /\s*'*none'*\s*/ ) { - - # print STDERR "skipping proxy testing\n"; - $skipproxy = 1; - } - -} - -$http = HTTP::Lite->new; - -#$http->{DEBUG} = 1; - -$http->http11_mode(1); - -# print "\n\n"; -$testno = 2; - -if ( !$skip ) { - - $url = "$testpath/test.txt"; - $res = $http->request($url); - print "not " if !defined($res); - print "ok $testno $url\n"; - $testno++; - $doc = $http->body; - print "not " if $doc ne "OK\n"; - print "ok $testno $url\n"; - $testno++; - - $http->reset; - $url = "http://invalidhost.thetoybox.org/"; - $res = $http->request($url); - print "not " if defined($res); - print "ok $testno $url\n"; - $testno++; - - $http->reset; - $url = "http://localhost:99999/"; - $res = $http->request($url); - print "not " if defined($res); - print "ok $testno $url\n"; - $testno++; - - $http->reset; - %vars = ( - "a" => "abc", - "b" => "hello world&", - ); - $http->prepare_post( \%vars ); - $url = "$testpath/post.cgi"; - $res = $http->request($url); - print "not " if !defined($res); - print "ok $testno $url\n"; - $testno++; - $doc = $http->body; - print "not " if $doc ne "a=abc\nb=hello world&\n"; - print "ok $testno $url\n"; - $testno++; - - $http->reset; - $url = "$testpath/chunked.cgi"; - $res = $http->request($url); - $doc = $http->body; - print "not " if length($doc) != 28; - print "ok $testno $url\n"; - $testno++; - print "not " if $doc ne "chunk1\nchunk2\nchunk3\nchunk4\n"; - print "ok $testno $url\n"; - $testno++; - - $http->reset; - $url = "$testpath/chunked2.cgi"; - $res = $http->request($url); - $doc = $http->body; - print "not " if length($doc) != 26; - print "ok $testno $url\n"; - $testno++; - print "not " if $doc ne "chunk1\nchunk2\nchunk3chunk4"; - print "ok $testno $url\n"; - $testno++; - - $http->reset; - $url = "$testpath/chunked3.cgi"; - $res = $http->request($url); - $doc = $http->body; - print "length not " if length($doc) != 34; - print "ok $testno $url\n"; - $testno++; - print "not " if $doc ne "chunk1\nchunk2\nchunk3chunk4chunk5\n\n"; - print "ok $testno $url\n"; - $testno++; - - $http->reset; - $url = "$testpath/unchunked.html"; - $res = $http->request($url); - $doc = $http->body; - print "not " if length($doc) != 33; - print "ok $testno $url\n"; - $testno++; - print "not " if $doc ne "unchunked1\nunchunked2\nunchunked3\n"; - print "ok $testno $url\n"; - $testno++; - - $http->reset; - $url = "$testpath/nonl.html"; - $res = $http->request($url); - $doc = $http->body; - print "not " if length($doc) != 17; - print "ok $testno $url\n"; - $testno++; - print "not " if $doc ne "line1\nline2\nline3"; - print "ok $testno $url\n"; - $testno++; - - $http->http11_mode(0); - $http->reset; - $url = "$testpath/nle.html"; - $res = $http->request($url); - $doc = $http->body; - print "not " if length($doc) != 19; - print "ok $testno $url\n"; - $testno++; - print "not " if $doc ne "line1\nline2\nline3\n\n"; - print "ok $testno $url\n"; - $testno++; - $http->reset; - $url = "$testpath/bigbinary.dat"; - $res = $http->request($url); - $bin = $http->body; - $http->reset; - $url = "$testpath/bigbinary.dat.md5"; - $res = $http->request($url); - chomp( $binsum = $http->body ); - eval "use Digest::MD5 qw(md5_hex);"; - - if ($@) { - print "ok $n (skipping test on this platform)\n"; - } - else { - $sum = md5_hex($bin); - print "not " if $binsum ne $sum; - print "ok $testno $url\n"; - } - $testno++; - - $http->http11_mode(1); - $http->reset; - $url = "$testpath/nle.html"; - $res = $http->request($url); - $doc = $http->body; - print "not " if length($doc) != 19; - print "ok $testno $url\n"; - $testno++; - print "not " if $doc ne "line1\nline2\nline3\n\n"; - print "ok $testno $url\n"; - $testno++; - $http->reset; - $url = "$testpath/bigbinary.dat"; - $res = $http->request($url); - $bin = $http->body; - $http->reset; - $url = "$testpath/bigbinary.dat.md5"; - $res = $http->request($url); - chomp( $binsum = $http->body ); - eval "use Digest::MD5 qw(md5_hex);"; - - if ($@) { - print "ok $n (skipping test on this platform)\n"; - } - else { - $sum = md5_hex($bin); - print "not " if $binsum ne $sum; - print "ok $testno $url\n"; - } - $testno++; - - $http->reset; - $url = "$testpath/bigtest.txt"; - $res = $http->request($url); - $bigtest = $http->body; - - $http->reset; - $url = "$testpath/chunked4.cgi"; - $res = $http->request($url); - $doc = $http->body; - print "not " if $doc ne "$bigtest$bigtest${bigtest}chunk4chunk5\n"; - print "ok $testno $url\n"; - $testno++; - - $http->reset; - $url = "$testpath/chunked5.cgi"; - $res = $http->request($url); - $doc = $http->body; - print "not " if $doc ne "$bigtest$bin${bigtest}chunk4chunk5\n"; - print "ok $testno $url\n"; - $testno++; - - # Callback test #1 - Unmodified callback - sub callback1 { - my ( $self, $dataref, $cbargs ) = @_; - $cbbytes += length($$dataref); - return $dataref; - } - - $http->reset; - $url = "$testpath/bigbinary.dat"; - $res = $http->request( $url, \&callback1 ); - $doc = $http->body; - print "not " if $doc ne $bin; - print "ok $testno $url\n"; - $testno++; - print "not " if length($bin) != $cbbytes; - print "ok $testno $url\n"; - $testno++; - - # Callback test #2 - Discard - sub callback2 { - my ( $self, $dataref, $cbargs ) = @_; - $cbbytes += length($$dataref); - return undef; - } - - $http->reset; - $url = "$testpath/bigbinary.dat"; - $res = $http->request( $url, \&callback2 ); - $doc = $http->body; - print "not " if defined($doc); - print "ok $testno $url\n"; - $testno++; - - # Callback test #3 - New callback syntax - sub callback3 { - my ( $self, $mode, $dataref, @args ) = @_; - $cbbytes += length($$dataref); - - # print STDERR "callback for $mode data is $dataref args are @args\n"; - return $dataref; - } - - $http->reset; - $url = "$testpath/bigbinary.dat"; - $http->set_callback( \&callback3, "arg1", "arg2", "arg3", ["arg4"] ); - $res = $http->request($url); - $doc = $http->body; - print "not " if $doc ne $bin; - print "ok $testno $url\n"; - $testno++; - -} -else { - for ( $n = $testno ; $n < 20 ; $n++ ) { - print "ok $n (skipping test on this platform)\n"; - } - $testno = $n; -} - -unless ( $skip || $skipproxy ) { - $http->reset; - $http->proxy($proxy); - $url = "$testpath/test.txt"; - $res = $http->request($url); - $doc = $http->body; - print "not " if length($doc) != 3; - print "ok $testno $url\n"; - $testno++; - print "not " if $doc ne "OK\n"; - print "ok $testno $url\n"; - $testno++; -} -else { - print "ok $testno (skipping test on this platform)\n"; - $testno++; - print "ok $testno (skipping test on this platform)\n"; -}