commit perl-HTTP-Request-AsCGI for openSUSE:Factory
Hello community, here is the log from the commit of package perl-HTTP-Request-AsCGI for openSUSE:Factory checked in at Tue May 31 16:53:48 CEST 2011. -------- --- perl-HTTP-Request-AsCGI/perl-HTTP-Request-AsCGI.changes 2010-12-01 14:46:54.000000000 +0100 +++ /mounts/work_src_done/STABLE/perl-HTTP-Request-AsCGI/perl-HTTP-Request-AsCGI.changes 2011-05-11 21:04:47.000000000 +0200 @@ -1,0 +2,8 @@ +Wed May 11 18:47:22 UTC 2011 - dbahi@novell.com + +- Fixed the %ENV concatenation that's broken in 1.1 but wasn't shipped to CPAN +- REQUEST_URI is trying to replicate as raw values as possible, without being canonicalized +- added test to check that %ENV is preserved after setup is called +- setup now concatenates its environment to %ENV instead of replacing it + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- HTTP-Request-AsCGI-1.0.tar.gz New: ---- HTTP-Request-AsCGI-1.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-HTTP-Request-AsCGI.spec ++++++ --- /var/tmp/diff_new_pack.ypDARX/_old 2011-05-31 16:51:24.000000000 +0200 +++ /var/tmp/diff_new_pack.ypDARX/_new 2011-05-31 16:51:24.000000000 +0200 @@ -18,15 +18,16 @@ Name: perl-HTTP-Request-AsCGI -Version: 1.0 +Version: 1.2 Release: 1 Summary: Set up a CGI environment from an HTTP::Request License: GPL+ or Artistic +%define cpan_name HTTP-Request-AsCGI Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/HTTP-Request-AsCGI/ -Source0: http://www.cpan.org/modules/by-module/HTTP/HTTP-Request-AsCGI-%{version}.tar.gz +#Source: http://www.cpan.org/modules/by-module/HTTP/HTTP-Request-AsCGI-%{version}.tar.gz +Source: %{cpan_name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{perl_requires} BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros @@ -42,13 +43,14 @@ Requires: perl(HTTP::Response) >= 1.53 Requires: perl(IO::File) Requires: perl(URI::Escape) +%{perl_requires} %description Provides a convenient way of setting up an CGI environment from an HTTP::Request. %prep -%setup -q -n HTTP-Request-AsCGI-%{version} +%setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor ++++++ HTTP-Request-AsCGI-1.0.tar.gz -> HTTP-Request-AsCGI-1.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Request-AsCGI-1.0/Changes new/HTTP-Request-AsCGI-1.2/Changes --- old/HTTP-Request-AsCGI-1.0/Changes 2009-11-30 21:53:46.000000000 +0100 +++ new/HTTP-Request-AsCGI-1.2/Changes 2010-01-12 23:03:40.000000000 +0100 @@ -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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Request-AsCGI-1.0/LICENSE new/HTTP-Request-AsCGI-1.2/LICENSE --- old/HTTP-Request-AsCGI-1.0/LICENSE 2009-11-30 21:53:46.000000000 +0100 +++ new/HTTP-Request-AsCGI-1.2/LICENSE 2010-01-12 23:03:40.000000000 +0100 @@ -1,9 +1,9 @@ -This software is copyright (c) 2009 by Christian Hansen <ch@ngmedia.com>. +This software is copyright (c) 2010 by Christian Hansen <ch@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. -Terms of Perl 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@ngmedia.com>. +This software is Copyright (c) 2010 by Christian Hansen <ch@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@ngmedia.com>. +This software is Copyright (c) 2010 by Christian Hansen <ch@ngmedia.com>. This is free software, licensed under: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Request-AsCGI-1.0/META.yml new/HTTP-Request-AsCGI-1.2/META.yml --- old/HTTP-Request-AsCGI-1.0/META.yml 2009-11-30 21:53:46.000000000 +0100 +++ new/HTTP-Request-AsCGI-1.2/META.yml 2010-01-12 23:03:40.000000000 +0100 @@ -3,7 +3,7 @@ author: - 'Christian Hansen <ch@ngmedia.com>' - 'Hans Dieter Pearcey <hdp@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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Request-AsCGI-1.0/Makefile.PL new/HTTP-Request-AsCGI-1.2/Makefile.PL --- old/HTTP-Request-AsCGI-1.0/Makefile.PL 2009-11-30 21:53:46.000000000 +0100 +++ new/HTTP-Request-AsCGI-1.2/Makefile.PL 2010-01-12 23:03:40.000000000 +0100 @@ -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 => { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Request-AsCGI-1.0/README new/HTTP-Request-AsCGI-1.2/README --- old/HTTP-Request-AsCGI-1.0/README 2009-11-30 21:53:46.000000000 +0100 +++ new/HTTP-Request-AsCGI-1.2/README 2010-01-12 23:03:40.000000000 +0100 @@ -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@ngmedia.com>. +This software is copyright (c) 2010 by Christian Hansen <ch@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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Request-AsCGI-1.0/dist.ini new/HTTP-Request-AsCGI-1.2/dist.ini --- old/HTTP-Request-AsCGI-1.0/dist.ini 2009-11-30 21:53:46.000000000 +0100 +++ new/HTTP-Request-AsCGI-1.2/dist.ini 2010-01-12 23:03:40.000000000 +0100 @@ -1,5 +1,5 @@ name = HTTP-Request-AsCGI -version = 1.0 +version = 1.2 license = Perl_5 author = Christian Hansen <ch@ngmedia.com> author = Hans Dieter Pearcey <hdp@cpan.org> @@ -17,3 +17,6 @@ [@Classic] [PodPurler] + +[MetaResources] +repository = http://dev.catalyst.perl.org/repos/Catalyst/HTTP-Request-AsCGI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Request-AsCGI-1.0/lib/HTTP/Request/AsCGI.pm new/HTTP-Request-AsCGI-1.2/lib/HTTP/Request/AsCGI.pm --- old/HTTP-Request-AsCGI-1.0/lib/HTTP/Request/AsCGI.pm 2009-11-30 21:53:46.000000000 +0100 +++ new/HTTP-Request-AsCGI-1.2/lib/HTTP/Request/AsCGI.pm 2010-01-12 23:03:40.000000000 +0100 @@ -1,12 +1,11 @@ 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; use IO::Handle; @@ -47,6 +46,9 @@ $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; my $environment = { @@ -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 +version 1.2 - enviroment +=for Pod::Coverage enviroment -=end Pod::Coverage +=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@ngmedia.com> - Hans Dieter Pearcey <hdp@cpan.org> +Christian Hansen <ch@ngmedia.com> +Hans Dieter Pearcey <hdp@cpan.org> =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2009 by Christian Hansen <ch@ngmedia.com>. +This software is copyright (c) 2010 by Christian Hansen <ch@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__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Request-AsCGI-1.0/t/05env.t new/HTTP-Request-AsCGI-1.2/t/05env.t --- old/HTTP-Request-AsCGI-1.0/t/05env.t 2009-11-30 21:53:46.000000000 +0100 +++ new/HTTP-Request-AsCGI-1.2/t/05env.t 2010-01-12 23:03:40.000000000 +0100 @@ -1,6 +1,6 @@ #!perl -use Test::More tests => 10; +use Test::More tests => 11; use strict; use warnings; @@ -9,6 +9,8 @@ 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 = ( SCRIPT_NAME => '/cgi-bin/script.cgi', @@ -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' ); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de