r61983 - in /trunk/libhttp-body-perl: ./ debian/ lib/HTTP/ lib/HTTP/Body/ scripts/ t/ t/data/benchmark/ t/data/multipart/ t/lib/
poisonbit-guest at users.alioth.debian.org
poisonbit-guest at users.alioth.debian.org
Tue Aug 24 16:00:34 UTC 2010
Author: poisonbit-guest
Date: Tue Aug 24 15:59:55 2010
New Revision: 61983
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=61983
Log:
New upstream release.
Added:
trunk/libhttp-body-perl/LICENSE
- copied unchanged from r61976, branches/upstream/libhttp-body-perl/current/LICENSE
trunk/libhttp-body-perl/dist.ini
- copied unchanged from r61976, branches/upstream/libhttp-body-perl/current/dist.ini
trunk/libhttp-body-perl/scripts/
- copied from r61976, branches/upstream/libhttp-body-perl/current/scripts/
trunk/libhttp-body-perl/t/08multipart-suffix.t
- copied unchanged from r61976, branches/upstream/libhttp-body-perl/current/t/08multipart-suffix.t
trunk/libhttp-body-perl/t/data/benchmark/
- copied from r61976, branches/upstream/libhttp-body-perl/current/t/data/benchmark/
trunk/libhttp-body-perl/t/data/multipart/014-content.dat
- copied unchanged from r61976, branches/upstream/libhttp-body-perl/current/t/data/multipart/014-content.dat
trunk/libhttp-body-perl/t/data/multipart/014-headers.pml
- copied unchanged from r61976, branches/upstream/libhttp-body-perl/current/t/data/multipart/014-headers.pml
Modified:
trunk/libhttp-body-perl/Changes
trunk/libhttp-body-perl/MANIFEST
trunk/libhttp-body-perl/META.yml
trunk/libhttp-body-perl/Makefile.PL
trunk/libhttp-body-perl/README
trunk/libhttp-body-perl/debian/changelog
trunk/libhttp-body-perl/lib/HTTP/Body.pm
trunk/libhttp-body-perl/lib/HTTP/Body/MultiPart.pm
trunk/libhttp-body-perl/lib/HTTP/Body/OctetStream.pm
trunk/libhttp-body-perl/lib/HTTP/Body/UrlEncoded.pm
trunk/libhttp-body-perl/lib/HTTP/Body/XForms.pm
trunk/libhttp-body-perl/lib/HTTP/Body/XFormsMultipart.pm
trunk/libhttp-body-perl/t/lib/PAML.pm
Modified: trunk/libhttp-body-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/Changes?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/Changes (original)
+++ trunk/libhttp-body-perl/Changes Tue Aug 24 15:59:55 2010
@@ -1,4 +1,15 @@
This file documents the revision history for Perl extension HTTP::Body.
+
+1.09 Thu 19 Aug 2010 19:08:55 UTC
+ - remove blib for PAUSE indexing.
+
+1.08 Thu 19 Aug 2010 18:08:42 UTC
+ - Temp files now preserve the suffix of the uploaded file. This makes
+ it possible to feed the file directly into a mime-type-determing
+ module that may rely on this suffix as part of its heuristic. (Dave
+ Rolsky)
+ - Fix for RT#54443 Xforms buffering incorrectly (Simon Elliott)
+ - Move to Dist::Zilla
1.07 2010-01-24 20:40:00
- Up IO::File dependency.
Modified: trunk/libhttp-body-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/MANIFEST?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/MANIFEST (original)
+++ trunk/libhttp-body-perl/MANIFEST Tue Aug 24 15:59:55 2010
@@ -1,4 +1,10 @@
Changes
+LICENSE
+MANIFEST
+META.yml
+Makefile.PL
+README
+dist.ini
inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
@@ -13,10 +19,8 @@
lib/HTTP/Body/UrlEncoded.pm
lib/HTTP/Body/XForms.pm
lib/HTTP/Body/XFormsMultipart.pm
-Makefile.PL
-MANIFEST This list of files
-META.yml
-README
+scripts/benchmark.pl
+scripts/stress.pl
t/01use.t
t/02pod.t
t/03podcoverage.t
@@ -26,6 +30,13 @@
t/05urlencoded.t
t/06octetstream.t
t/07xforms.t
+t/08multipart-suffix.t
+t/data/benchmark/001-content.dat
+t/data/benchmark/001-headers.pml
+t/data/benchmark/002-content.dat
+t/data/benchmark/002-headers.pml
+t/data/benchmark/003-content.dat
+t/data/benchmark/003-headers.pml
t/data/multipart/001-content.dat
t/data/multipart/001-headers.pml
t/data/multipart/001-results.pml
@@ -65,6 +76,8 @@
t/data/multipart/013-content.dat
t/data/multipart/013-headers.pml
t/data/multipart/013-results.pml
+t/data/multipart/014-content.dat
+t/data/multipart/014-headers.pml
t/data/octetstream/001-content.dat
t/data/octetstream/001-headers.pml
t/data/octetstream/001-results.dat
Modified: trunk/libhttp-body-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/META.yml?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/META.yml (original)
+++ trunk/libhttp-body-perl/META.yml Tue Aug 24 15:59:55 2010
@@ -2,28 +2,23 @@
abstract: 'HTTP Body Parser'
author:
- 'Christian Hansen, C<chansen at cpan.org>'
+ - 'Sebastian Riedel, C<sri at cpan.org>'
+ - 'Andy Grundman, C<andy at hybridized.org>'
build_requires:
- ExtUtils::MakeMaker: 6.42
Test::Deep: 0
Test::More: 0.86
configure_requires:
- ExtUtils::MakeMaker: 6.42
-distribution_type: module
-generated_by: 'Module::Install version 0.91'
+ ExtUtils::MakeMaker: 6.31
+dynamic_config: 0
+generated_by: 'Dist::Zilla version 4.102221, CPAN::Meta::Converter version 2.102160'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: HTTP-Body
-no_index:
- directory:
- - inc
- - t
requires:
Carp: 0
File::Temp: 0.14
HTTP::Headers: 0
IO::File: 1.14
-resources:
- license: http://dev.perl.org/licenses/
-version: 1.07
+version: 1.09
Modified: trunk/libhttp-body-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/Makefile.PL?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/Makefile.PL (original)
+++ trunk/libhttp-body-perl/Makefile.PL Tue Aug 24 15:59:55 2010
@@ -1,16 +1,57 @@
-#!perl
-use inc::Module::Install;
+use strict;
+use warnings;
-name 'HTTP-Body';
-all_from 'lib/HTTP/Body.pm';
-requires 'Carp';
-requires 'File::Temp' => '0.14';
-requires 'HTTP::Headers';
-requires 'IO::File' => '1.14';
-test_requires 'Test::More' => '0.86';
-test_requires 'Test::Deep';
+use ExtUtils::MakeMaker 6.31;
-WriteAll;
+
+
+my %WriteMakefileArgs = (
+ 'ABSTRACT' => 'HTTP Body Parser',
+ 'AUTHOR' => 'Christian Hansen, C<chansen at cpan.org>, Sebastian Riedel, C<sri at cpan.org>, Andy Grundman, C<andy at hybridized.org>',
+ 'BUILD_REQUIRES' => {
+ 'Test::Deep' => '0',
+ 'Test::More' => '0.86'
+ },
+ 'CONFIGURE_REQUIRES' => {
+ 'ExtUtils::MakeMaker' => '6.31'
+ },
+ 'DISTNAME' => 'HTTP-Body',
+ 'EXE_FILES' => [],
+ 'LICENSE' => 'perl',
+ 'NAME' => 'HTTP::Body',
+ 'PREREQ_PM' => {
+ 'Carp' => '0',
+ 'File::Temp' => '0.14',
+ 'HTTP::Headers' => '0',
+ 'IO::File' => '1.14'
+ },
+ 'VERSION' => '1.09',
+ 'test' => {
+ 'TESTS' => 't/*.t'
+ }
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
+ my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
+ my $pp = $WriteMakefileArgs{PREREQ_PM};
+ for my $mod ( keys %$br ) {
+ if ( exists $pp->{$mod} ) {
+ $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
+ }
+ else {
+ $pp->{$mod} = $br->{$mod};
+ }
+ }
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+ unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+
+WriteMakefile(%WriteMakefileArgs);
+
+
+
Modified: trunk/libhttp-body-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/README?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/README (original)
+++ trunk/libhttp-body-perl/README Tue Aug 24 15:59:55 2010
@@ -1,101 +1,13 @@
-NAME
- HTTP::Body - HTTP Body Parser
-SYNOPSIS
- use HTTP::Body;
-
- sub handler : method {
- my ( $class, $r ) = @_;
- my $content_type = $r->headers_in->get('Content-Type');
- my $content_length = $r->headers_in->get('Content-Length');
-
- my $body = HTTP::Body->new( $content_type, $content_length );
- my $length = $content_length;
+This archive contains the distribution HTTP-Body,
+version 1.09:
- while ( $length ) {
+ HTTP Body Parser
- $r->read( my $buffer, ( $length < 8192 ) ? $length : 8192 );
+This software is copyright (c) 2010 by Christian Hansen.
- $length -= length($buffer);
-
- $body->add($buffer);
- }
-
- my $uploads = $body->upload; # hashref
- my $params = $body->param; # hashref
- my $body = $body->body; # IO::Handle
- }
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
-DESCRIPTION
- HTTP::Body parses chunks of HTTP POST data and supports
- application/octet-stream, application/x-www-form-urlencoded, and
- multipart/form-data.
- Chunked bodies are supported by not passing a length value to new().
-
- It is currently used by Catalyst to parse POST bodies.
-
-NOTES
- When parsing multipart bodies, temporary files are created to store any
- uploaded files. You must delete these temporary files yourself after
- processing them.
-
-METHODS
- new Constructor. Takes content type and content length as parameters,
- returns a HTTP::Body object.
-
- add Add string to internal buffer. Will call spin unless done. returns
- length before adding self.
-
- body
- accessor for the body.
-
- chunked
- Returns 1 if the request is chunked.
-
- content_length
- Returns the content-length for the body data if known. Returns -1 if
- the request is chunked.
-
- content_type
- Returns the content-type of the body data.
-
- init
- return self.
-
- length
- Returns the total length of data we expect to read if known. In the
- case of a chunked request, returns the amount of data read so far.
-
- trailing_headers
- If a chunked request body had trailing headers, trailing_headers
- will return an HTTP::Headers object populated with those headers.
-
- spin
- Abstract method to spin the io handle.
-
- state
- Returns the current state of the parser.
-
- param
- Get/set body parameters.
-
- upload
- Get/set file uploads.
-
- tmpdir
- Specify a different path for temporary files. Defaults to the system
- temporary path.
-
-AUTHOR
- Christian Hansen, "ch at ngmedia.com"
-
- Sebastian Riedel, "sri at cpan.org"
-
- Andy Grundman, "andy at hybridized.org"
-
-LICENSE
- This library is free software. You can redistribute it and/or modify it
- under the same terms as perl itself.
-
Modified: trunk/libhttp-body-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/debian/changelog?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/debian/changelog (original)
+++ trunk/libhttp-body-perl/debian/changelog Tue Aug 24 15:59:55 2010
@@ -1,4 +1,14 @@
-libhttp-body-perl (1.07-1) UNRELEASED; urgency=low
+libhttp-body-perl (1.09-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * New module authors, and upstream changed to Dist::Zilla
+ * Added Examples (benchmark.pl and stress.pl)
+ * New tests for changes since 1.07-1
+
+ -- Iñigo Tejedor Arrondo <poisonbit at gmail.com> Thue, 24 Aug 2010 17:50:04 +0200
+
+
+libhttp-body-perl (1.07-1) unstable; urgency=low
IGNORE-VERSION: 1.07-1
No need to upload as the upstream release had no significant changes
Modified: trunk/libhttp-body-perl/lib/HTTP/Body.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/lib/HTTP/Body.pm?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/lib/HTTP/Body.pm (original)
+++ trunk/libhttp-body-perl/lib/HTTP/Body.pm Tue Aug 24 15:59:55 2010
@@ -1,10 +1,11 @@
package HTTP::Body;
+BEGIN {
+ $HTTP::Body::VERSION = '1.09';
+}
use strict;
use Carp qw[ ];
-
-our $VERSION = '1.07';
our $TYPES = {
'application/octet-stream' => 'HTTP::Body::OctetStream',
Modified: trunk/libhttp-body-perl/lib/HTTP/Body/MultiPart.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/lib/HTTP/Body/MultiPart.pm?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/lib/HTTP/Body/MultiPart.pm (original)
+++ trunk/libhttp-body-perl/lib/HTTP/Body/MultiPart.pm Tue Aug 24 15:59:55 2010
@@ -1,4 +1,7 @@
package HTTP::Body::MultiPart;
+BEGIN {
+ $HTTP::Body::MultiPart::VERSION = '1.09';
+}
use strict;
use base 'HTTP::Body';
@@ -270,7 +273,9 @@
$part->{filename} = $filename;
if ( $filename ne "" ) {
- my $fh = File::Temp->new( UNLINK => 0, DIR => $self->tmpdir );
+ my $suffix = $filename =~ /[^.]+(\.[^\\\/]+)$/ ? $1 : q{};
+
+ my $fh = File::Temp->new( UNLINK => 0, DIR => $self->tmpdir, SUFFIX => $suffix );
$part->{fh} = $fh;
$part->{tempname} = $fh->filename;
Modified: trunk/libhttp-body-perl/lib/HTTP/Body/OctetStream.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/lib/HTTP/Body/OctetStream.pm?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/lib/HTTP/Body/OctetStream.pm (original)
+++ trunk/libhttp-body-perl/lib/HTTP/Body/OctetStream.pm Tue Aug 24 15:59:55 2010
@@ -1,4 +1,7 @@
package HTTP::Body::OctetStream;
+BEGIN {
+ $HTTP::Body::OctetStream::VERSION = '1.09';
+}
use strict;
use base 'HTTP::Body';
Modified: trunk/libhttp-body-perl/lib/HTTP/Body/UrlEncoded.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/lib/HTTP/Body/UrlEncoded.pm?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/lib/HTTP/Body/UrlEncoded.pm (original)
+++ trunk/libhttp-body-perl/lib/HTTP/Body/UrlEncoded.pm Tue Aug 24 15:59:55 2010
@@ -1,4 +1,7 @@
package HTTP::Body::UrlEncoded;
+BEGIN {
+ $HTTP::Body::UrlEncoded::VERSION = '1.09';
+}
use strict;
use base 'HTTP::Body';
Modified: trunk/libhttp-body-perl/lib/HTTP/Body/XForms.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/lib/HTTP/Body/XForms.pm?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/lib/HTTP/Body/XForms.pm (original)
+++ trunk/libhttp-body-perl/lib/HTTP/Body/XForms.pm Tue Aug 24 15:59:55 2010
@@ -1,4 +1,7 @@
package HTTP::Body::XForms;
+BEGIN {
+ $HTTP::Body::XForms::VERSION = '1.09';
+}
use strict;
use base 'HTTP::Body';
@@ -35,6 +38,8 @@
sub spin {
my $self = shift;
+ return unless $self->length == $self->content_length;
+
$self->body($self->{buffer});
$self->param( 'XForms:Model', $self->{buffer} );
$self->{buffer} = '';
Modified: trunk/libhttp-body-perl/lib/HTTP/Body/XFormsMultipart.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/lib/HTTP/Body/XFormsMultipart.pm?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/lib/HTTP/Body/XFormsMultipart.pm (original)
+++ trunk/libhttp-body-perl/lib/HTTP/Body/XFormsMultipart.pm Tue Aug 24 15:59:55 2010
@@ -1,4 +1,7 @@
package HTTP::Body::XFormsMultipart;
+BEGIN {
+ $HTTP::Body::XFormsMultipart::VERSION = '1.09';
+}
use strict;
use base 'HTTP::Body::MultiPart';
Modified: trunk/libhttp-body-perl/t/lib/PAML.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-body-perl/t/lib/PAML.pm?rev=61983&op=diff
==============================================================================
--- trunk/libhttp-body-perl/t/lib/PAML.pm (original)
+++ trunk/libhttp-body-perl/t/lib/PAML.pm Tue Aug 24 15:59:55 2010
@@ -50,7 +50,7 @@
my $data = do {
my $io = IO::File->new($path, '<')
- || corak(qq[Couldn't open path '$path' in read mode: $!]);
+ || croak(qq[Couldn't open path '$path' in read mode: $!]);
$io->binmode
|| croak(qq[Couldn't binmode filehandle: $!]);
More information about the Pkg-perl-cvs-commits
mailing list