r50836 - in /branches/upstream/libhttp-request-ascgi-perl/current: Changes LICENSE META.yml Makefile.PL README dist.ini lib/HTTP/Request/AsCGI.pm t/05env.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed Jan 13 04:21:53 UTC 2010
Author: jawnsy-guest
Date: Wed Jan 13 04:21:43 2010
New Revision: 50836
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=50836
Log:
[svn-upgrade] Integrating new upstream version, libhttp-request-ascgi-perl (1.2)
Modified:
branches/upstream/libhttp-request-ascgi-perl/current/Changes
branches/upstream/libhttp-request-ascgi-perl/current/LICENSE
branches/upstream/libhttp-request-ascgi-perl/current/META.yml
branches/upstream/libhttp-request-ascgi-perl/current/Makefile.PL
branches/upstream/libhttp-request-ascgi-perl/current/README
branches/upstream/libhttp-request-ascgi-perl/current/dist.ini
branches/upstream/libhttp-request-ascgi-perl/current/lib/HTTP/Request/AsCGI.pm
branches/upstream/libhttp-request-ascgi-perl/current/t/05env.t
Modified: branches/upstream/libhttp-request-ascgi-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-request-ascgi-perl/current/Changes?rev=50836&op=diff
==============================================================================
--- branches/upstream/libhttp-request-ascgi-perl/current/Changes (original)
+++ branches/upstream/libhttp-request-ascgi-perl/current/Changes Wed Jan 13 04:21:43 2010
@@ -1,6 +1,14 @@
This file documents the revision history for Perl extension HTTP::Request::AsCGI.
-1.0
+1.2 2010-01-12
+ - Fixed the %ENV concatenation that's broken in 1.1 but wasn't shipped to CPAN (miyagawa)
+ - REQUEST_URI is trying to replicate as raw values as possible, without being canonicalized (miyagawa)
+
+1.1 2009-12-07
+ - added test to check that %ENV is preserved after setup is called
+ - setup now concatenates its environment to %ENV instead of replacing it
+
+1.0 2009-11-30
- Change how PATH_INFO is decoded so that everything is decoded, including
URI reserved characters (RT#50082)
Modified: branches/upstream/libhttp-request-ascgi-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-request-ascgi-perl/current/LICENSE?rev=50836&op=diff
==============================================================================
--- branches/upstream/libhttp-request-ascgi-perl/current/LICENSE (original)
+++ branches/upstream/libhttp-request-ascgi-perl/current/LICENSE Wed Jan 13 04:21:43 2010
@@ -1,9 +1,9 @@
-This software is copyright (c) 2009 by Christian Hansen <ch at ngmedia.com>.
+This software is copyright (c) 2010 by Christian Hansen <ch at ngmedia.com>.
This is free software; you can redistribute it and/or modify it under
-the same terms as perl itself.
-
-Terms of Perl itself
+the same terms as the Perl 5 programming language system itself.
+
+Terms of the Perl programming language system itself
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
@@ -12,7 +12,7 @@
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2009 by Christian Hansen <ch at ngmedia.com>.
+This software is Copyright (c) 2010 by Christian Hansen <ch at ngmedia.com>.
This is free software, licensed under:
@@ -270,7 +270,7 @@
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2009 by Christian Hansen <ch at ngmedia.com>.
+This software is Copyright (c) 2010 by Christian Hansen <ch at ngmedia.com>.
This is free software, licensed under:
Modified: branches/upstream/libhttp-request-ascgi-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-request-ascgi-perl/current/META.yml?rev=50836&op=diff
==============================================================================
--- branches/upstream/libhttp-request-ascgi-perl/current/META.yml (original)
+++ branches/upstream/libhttp-request-ascgi-perl/current/META.yml Wed Jan 13 04:21:43 2010
@@ -3,7 +3,7 @@
author:
- 'Christian Hansen <ch at ngmedia.com>'
- 'Hans Dieter Pearcey <hdp at cpan.org>'
-generated_by: 'Dist::Zilla version 1.093290'
+generated_by: 'Dist::Zilla version 1.093400'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -17,4 +17,6 @@
IO::File: 0
Test::More: 0
URI::Escape: 0
-version: 1.0
+resources:
+ repository: http://dev.catalyst.perl.org/repos/Catalyst/HTTP-Request-AsCGI
+version: 1.2
Modified: branches/upstream/libhttp-request-ascgi-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-request-ascgi-perl/current/Makefile.PL?rev=50836&op=diff
==============================================================================
--- branches/upstream/libhttp-request-ascgi-perl/current/Makefile.PL (original)
+++ branches/upstream/libhttp-request-ascgi-perl/current/Makefile.PL Wed Jan 13 04:21:43 2010
@@ -11,7 +11,7 @@
NAME => 'HTTP::Request::AsCGI',
AUTHOR => "Christian\ Hansen\ \<ch\@ngmedia\.com\>\,\ Hans\ Dieter\ Pearcey\ \<hdp\@cpan\.org\>",
ABSTRACT => "Set\ up\ a\ CGI\ environment\ from\ an\ HTTP\:\:Request",
- VERSION => '1.0',
+ VERSION => '1.2',
EXE_FILES => [ qw() ],
(eval { ExtUtils::MakeMaker->VERSION(6.31) } ? (LICENSE => 'perl') : ()),
PREREQ_PM => {
Modified: branches/upstream/libhttp-request-ascgi-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-request-ascgi-perl/current/README?rev=50836&op=diff
==============================================================================
--- branches/upstream/libhttp-request-ascgi-perl/current/README (original)
+++ branches/upstream/libhttp-request-ascgi-perl/current/README Wed Jan 13 04:21:43 2010
@@ -1,12 +1,12 @@
This archive contains the distribution HTTP-Request-AsCGI, version
-1.0:
+1.2:
Set up a CGI environment from an HTTP::Request
-This software is copyright (c) 2009 by Christian Hansen <ch at ngmedia.com>.
+This software is copyright (c) 2010 by Christian Hansen <ch at ngmedia.com>.
This is free software; you can redistribute it and/or modify it under
-the same terms as perl itself.
+the same terms as the Perl 5 programming language system itself.
Modified: branches/upstream/libhttp-request-ascgi-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-request-ascgi-perl/current/dist.ini?rev=50836&op=diff
==============================================================================
--- branches/upstream/libhttp-request-ascgi-perl/current/dist.ini (original)
+++ branches/upstream/libhttp-request-ascgi-perl/current/dist.ini Wed Jan 13 04:21:43 2010
@@ -1,5 +1,5 @@
name = HTTP-Request-AsCGI
-version = 1.0
+version = 1.2
license = Perl_5
author = Christian Hansen <ch at ngmedia.com>
author = Hans Dieter Pearcey <hdp at cpan.org>
@@ -17,3 +17,6 @@
[@Classic]
[PodPurler]
+
+[MetaResources]
+repository = http://dev.catalyst.perl.org/repos/Catalyst/HTTP-Request-AsCGI
Modified: branches/upstream/libhttp-request-ascgi-perl/current/lib/HTTP/Request/AsCGI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-request-ascgi-perl/current/lib/HTTP/Request/AsCGI.pm?rev=50836&op=diff
==============================================================================
--- branches/upstream/libhttp-request-ascgi-perl/current/lib/HTTP/Request/AsCGI.pm (original)
+++ branches/upstream/libhttp-request-ascgi-perl/current/lib/HTTP/Request/AsCGI.pm Wed Jan 13 04:21:43 2010
@@ -1,11 +1,10 @@
package HTTP::Request::AsCGI;
+our $VERSION = '1.2';
# ABSTRACT: Set up a CGI environment from an HTTP::Request
use strict;
use warnings;
use bytes;
use base 'Class::Accessor::Fast';
-
-our $VERSION = '1.0';
use Carp;
use HTTP::Response;
@@ -46,6 +45,9 @@
$uri->host('localhost') unless $uri->host;
$uri->port(80) unless $uri->port;
$uri->host_port($host) unless !$host || ( $host eq $uri->host_port );
+
+ # Get it before canonicalized so REQUEST_URI can be as raw as possible
+ my $request_uri = $uri->path_query;
$uri = $uri->canonical;
@@ -63,7 +65,7 @@
REMOTE_ADDR => '127.0.0.1',
REMOTE_HOST => 'localhost',
REMOTE_PORT => int( rand(64000) + 1000 ), # not in RFC 3875
- REQUEST_URI => $uri->path_query, # not in RFC 3875
+ REQUEST_URI => $request_uri, # not in RFC 3875
REQUEST_METHOD => $request->method,
@_
};
@@ -149,7 +151,7 @@
{
no warnings 'uninitialized';
- %ENV = %{ $self->environment };
+ %ENV = (%ENV, %{ $self->environment });
}
if ( $INC{'CGI.pm'} ) {
@@ -174,7 +176,7 @@
$headers .= $line;
last if $headers =~ /\x0d?\x0a\x0d?\x0a$/;
}
-
+
unless ( defined $headers ) {
$headers = "HTTP/1.1 500 Internal Server Error\x0d\x0a";
}
@@ -201,7 +203,7 @@
$response->code($code);
$response->message($message);
}
-
+
my $length = ( stat( $self->stdout ) )[7] - tell( $self->stdout );
if ( $response->code == 500 && !$length ) {
@@ -294,7 +296,6 @@
-
=pod
=head1 NAME
@@ -303,14 +304,13 @@
=head1 VERSION
-version 1.0
-
-=begin Pod::Coverage
-
- enviroment
-
-=end Pod::Coverage
-
+version 1.2
+
+=for Pod::Coverage enviroment
+
+=cut
+
+=pod
=head1 SYNOPSIS
@@ -347,7 +347,7 @@
=head1 METHODS
-=over 4
+=over 4
=item new ( $request [, key => value ] )
@@ -356,7 +356,7 @@
=item environment
-Returns a hashref containing the environment that will be used in setup.
+Returns a hashref containing the environment that will be used in setup.
Changing the hashref after setup has been called will have no effect.
=item setup
@@ -390,7 +390,7 @@
Accessor for handle that will be used for STDERR, must be a real seekable
handle with an file descriptor.
-=back
+=back
=head1 SEE ALSO
@@ -402,28 +402,25 @@
=item L<Test::WWW::Mechanize::CGI>
-=back
+=back
=head1 THANKS TO
Thomas L. Shinnick for his valuable win32 testing.
-
-
=head1 AUTHORS
- Christian Hansen <ch at ngmedia.com>
- Hans Dieter Pearcey <hdp at cpan.org>
+Christian Hansen <ch at ngmedia.com>
+Hans Dieter Pearcey <hdp at cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2009 by Christian Hansen <ch at ngmedia.com>.
+This software is copyright (c) 2010 by Christian Hansen <ch at ngmedia.com>.
This is free software; you can redistribute it and/or modify it under
-the same terms as perl itself.
-
-=cut
-
+the same terms as the Perl 5 programming language system itself.
+
+=cut
__END__
Modified: branches/upstream/libhttp-request-ascgi-perl/current/t/05env.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-request-ascgi-perl/current/t/05env.t?rev=50836&op=diff
==============================================================================
--- branches/upstream/libhttp-request-ascgi-perl/current/t/05env.t (original)
+++ branches/upstream/libhttp-request-ascgi-perl/current/t/05env.t Wed Jan 13 04:21:43 2010
@@ -1,6 +1,6 @@
#!perl
-use Test::More tests => 10;
+use Test::More tests => 11;
use strict;
use warnings;
@@ -8,6 +8,8 @@
use HTTP::Request;
use HTTP::Request::AsCGI;
use Encode;
+
+$ENV{__PRESERVE_ENV_TEST} = 1;
my $r = HTTP::Request->new( GET => 'http://www.host.com/cgi-bin/script.cgi/my%20path%2F?a=1&b=2', [ 'X-Test' => 'Test' ] );
my %e = (
@@ -31,6 +33,8 @@
is( $ENV{SERVER_NAME}, 'www.host.com', 'SERVER_NAME' );
is( $ENV{SERVER_PORT}, '80', 'SERVER_PORT' );
+is( $ENV{__PRESERVE_ENV_TEST}, 1, 'PRESERVE_ENV' );
+
$c->restore;
is( $ENV{GATEWAY_INTERFACE}, undef, 'No CGI env after restore' );
More information about the Pkg-perl-cvs-commits
mailing list