r48133 - in /trunk/libcatalyst-perl: ./ debian/ inc/Module/Install/ lib/ lib/Catalyst/ lib/Catalyst/Engine/ lib/Catalyst/Script/ script/ t/ t/aggregate/ t/author/ t/lib/ t/lib/Catalyst/Plugin/Test/ t/lib/Catalyst/Script/ t/lib/ScriptTestApp/ t/lib/TestApp/Controller/ t/lib/TestApp/Controller/Action/Chained/ t/lib/TestAppEncoding/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Dec 3 02:10:22 UTC 2009


Author: jawnsy-guest
Date: Thu Dec  3 02:10:14 2009
New Revision: 48133

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=48133
Log:
integrate new upstream release (this version moves pod&pod coverage tests, they may no longer be necessary)

Added:
    trunk/libcatalyst-perl/lib/Catalyst/Script/
      - copied from r48132, branches/upstream/libcatalyst-perl/current/lib/Catalyst/Script/
    trunk/libcatalyst-perl/lib/Catalyst/ScriptRole.pm
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/lib/Catalyst/ScriptRole.pm
    trunk/libcatalyst-perl/lib/Catalyst/ScriptRunner.pm
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/lib/Catalyst/ScriptRunner.pm
    trunk/libcatalyst-perl/t/aggregate/unit_core_script_cgi.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_script_cgi.t
    trunk/libcatalyst-perl/t/aggregate/unit_core_script_create.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_script_create.t
    trunk/libcatalyst-perl/t/aggregate/unit_core_script_fastcgi.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_script_fastcgi.t
    trunk/libcatalyst-perl/t/aggregate/unit_core_script_help.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_script_help.t
    trunk/libcatalyst-perl/t/aggregate/unit_core_script_server.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_script_server.t
    trunk/libcatalyst-perl/t/aggregate/unit_core_script_test.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_script_test.t
    trunk/libcatalyst-perl/t/aggregate/unit_core_scriptrunner.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_scriptrunner.t
    trunk/libcatalyst-perl/t/aggregate/utf8_content_length.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/aggregate/utf8_content_length.t
    trunk/libcatalyst-perl/t/author/notabs.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/author/notabs.t
    trunk/libcatalyst-perl/t/author/pod.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/author/pod.t
    trunk/libcatalyst-perl/t/author/podcoverage.t
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/author/podcoverage.t
    trunk/libcatalyst-perl/t/lib/Catalyst/Script/
      - copied from r48132, branches/upstream/libcatalyst-perl/current/t/lib/Catalyst/Script/
    trunk/libcatalyst-perl/t/lib/ScriptTestApp/
      - copied from r48132, branches/upstream/libcatalyst-perl/current/t/lib/ScriptTestApp/
    trunk/libcatalyst-perl/t/lib/TestApp/Controller/Action/Chained/CaptureArgs.pm
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Action/Chained/CaptureArgs.pm
    trunk/libcatalyst-perl/t/lib/TestAppEncoding/
      - copied from r48132, branches/upstream/libcatalyst-perl/current/t/lib/TestAppEncoding/
    trunk/libcatalyst-perl/t/lib/TestAppEncoding.pm
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/lib/TestAppEncoding.pm
    trunk/libcatalyst-perl/t/lib/TestAppToTestScripts.pm
      - copied unchanged from r48132, branches/upstream/libcatalyst-perl/current/t/lib/TestAppToTestScripts.pm
Removed:
    trunk/libcatalyst-perl/t/02pod.t
    trunk/libcatalyst-perl/t/03podcoverage.t
    trunk/libcatalyst-perl/t/04critic.t
Modified:
    trunk/libcatalyst-perl/Changes
    trunk/libcatalyst-perl/MANIFEST
    trunk/libcatalyst-perl/META.yml
    trunk/libcatalyst-perl/Makefile.PL
    trunk/libcatalyst-perl/debian/changelog
    trunk/libcatalyst-perl/inc/Module/Install/AuthorRequires.pm
    trunk/libcatalyst-perl/lib/Catalyst.pm
    trunk/libcatalyst-perl/lib/Catalyst/Engine.pm
    trunk/libcatalyst-perl/lib/Catalyst/Engine/CGI.pm
    trunk/libcatalyst-perl/lib/Catalyst/Engine/FastCGI.pm
    trunk/libcatalyst-perl/lib/Catalyst/Response.pm
    trunk/libcatalyst-perl/lib/Catalyst/Runtime.pm
    trunk/libcatalyst-perl/script/catalyst.pl
    trunk/libcatalyst-perl/t/aggregate/live_component_controller_action_chained.t
    trunk/libcatalyst-perl/t/aggregate/live_engine_request_escaped_path.t
    trunk/libcatalyst-perl/t/aggregate/unit_core_setup_log.t
    trunk/libcatalyst-perl/t/author/http-server.t
    trunk/libcatalyst-perl/t/deprecated.t
    trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Deprecated.pm
    trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Plugin.pm
    trunk/libcatalyst-perl/t/lib/TestApp/Controller/Root.pm
    trunk/libcatalyst-perl/t/lib/TestAppPluginWithConstructor.pm
    trunk/libcatalyst-perl/t/live_component_controller_context_closure.t
    trunk/libcatalyst-perl/t/live_fork.t

Modified: trunk/libcatalyst-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/Changes?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/Changes (original)
+++ trunk/libcatalyst-perl/Changes Thu Dec  3 02:10:14 2009
@@ -1,4 +1,52 @@
 # This file documents the revision history for Perl extension Catalyst.
+
+5.80015 2009-12-02 15:13:54
+  Bug fixes:
+   - Fix bug in Catalyst::Engine which would cause a request parsing to end
+     prematurely in the hypothetical case where calling $engine->read returned
+     the single character '0'.
+   - Fix failing tests when combined with new HTTP::Request::AsCGI
+
+  Documentation:
+   - Improved documentation on read and read_chunk methods in Catalyst::Engine.
+   - Fix reversal of SCRIPT_NAME and PATH_INFO in previously correct nginx
+     FastCGI documentation introduced in _02.
+
+5.80014_02 2009-12-01 00:55:23
+  Bug fixes:
+   - Fix reporting the wrong Content-Length if the response body is an
+     upgraded string. Strings mean the same thing whether or not they are
+     upgraded, may get upgraded even after they are encoded, and will
+     produce the same output either way, but bytes::length returns too big
+     values for upgraded strings containing characters >127
+   - Fix t/live_fork.t with bleadperl (RT#52100)
+   - Set $ENV{PATH_INFO} from $ENV{REQUEST_URI} combined with
+     $ENV{SCRIPT_NAME} if possible. This is many web servers always fully
+     decode PATH_INFO including URI reserved characters. This allows us to
+     tell foo%2cbar from foo%252cbar, and fixes issues with %2F in paths
+     being incorrectly decoded, resulting in too many path parts (rather
+     than 1 path part containing a /, on some web servers (at least nginx).
+     (RT#50082)
+   - Require new HTTP::Request::AsCGI so that it fully decodes $ENV{PATH_INFO}
+     in non CGI contexts. (RT#50082)
+
+  Refactoring / cleanups:
+   - NoTabs and Pod tests moved to t/author so that they're not run
+     (and then skipped) normally.
+
+  Documentation:
+    - Fix Pod nits in Catalyst::Response (RT#51818)
+
+5.80014_01 2009-11-22 20:01:23
+
+  Bug fixes:
+   - Filehandle now forced to binmode in CGI and FastCGI engines. This appears
+     to correct some UTF-8 issues, but may break people's code which relies
+     on the old behaviour.
+
+  Refactoring / cleanups:
+   - Plugins which inherit from Catalyst::Controller or Catalyst::Component
+     are deprecated and now issue warnings.
 
 5.80014 2009-11-21 02:51:14
 

Modified: trunk/libcatalyst-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/MANIFEST?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/MANIFEST (original)
+++ trunk/libcatalyst-perl/MANIFEST Thu Dec  3 02:10:14 2009
@@ -47,6 +47,13 @@
 lib/Catalyst/Request/Upload.pm
 lib/Catalyst/Response.pm
 lib/Catalyst/Runtime.pm
+lib/Catalyst/Script/CGI.pm
+lib/Catalyst/Script/Create.pm
+lib/Catalyst/Script/FastCGI.pm
+lib/Catalyst/Script/Server.pm
+lib/Catalyst/Script/Test.pm
+lib/Catalyst/ScriptRole.pm
+lib/Catalyst/ScriptRunner.pm
 lib/Catalyst/Stats.pm
 lib/Catalyst/Test.pm
 lib/Catalyst/Upgrading.pod
@@ -58,9 +65,6 @@
 README
 script/catalyst.pl
 t/01use.t
-t/02pod.t
-t/03podcoverage.t
-t/04critic.t
 t/aggregate.t
 t/aggregate/c3_appclass_bug.t
 t/aggregate/c3_mro.t
@@ -136,6 +140,13 @@
 t/aggregate/unit_core_mvc.t
 t/aggregate/unit_core_path_to.t
 t/aggregate/unit_core_plugin.t
+t/aggregate/unit_core_script_cgi.t
+t/aggregate/unit_core_script_create.t
+t/aggregate/unit_core_script_fastcgi.t
+t/aggregate/unit_core_script_help.t
+t/aggregate/unit_core_script_server.t
+t/aggregate/unit_core_script_test.t
+t/aggregate/unit_core_scriptrunner.t
 t/aggregate/unit_core_setup.t
 t/aggregate/unit_core_setup_log.t
 t/aggregate/unit_core_setup_stats.t
@@ -152,7 +163,11 @@
 t/aggregate/unit_utils_env_value.t
 t/aggregate/unit_utils_prefix.t
 t/aggregate/unit_utils_request.t
+t/aggregate/utf8_content_length.t
 t/author/http-server.t
+t/author/notabs.t
+t/author/pod.t
+t/author/podcoverage.t
 t/catalyst_130pix.gif
 t/conf/extra.conf.in
 t/custom_exception_class_simple.t
@@ -171,6 +186,9 @@
 t/lib/Catalyst/Plugin/Test/Headers.pm
 t/lib/Catalyst/Plugin/Test/MangleDollarUnderScore.pm
 t/lib/Catalyst/Plugin/Test/Plugin.pm
+t/lib/Catalyst/Script/Bar.pm
+t/lib/Catalyst/Script/Baz.pm
+t/lib/Catalyst/Script/CompileTest.pm
 t/lib/CDICompatTestPlugin.pm
 t/lib/DeprecatedActionsInAppClassTestApp.pm
 t/lib/DeprecatedTestApp.pm
@@ -178,6 +196,9 @@
 t/lib/NullPackage.pm
 t/lib/PluginTestApp.pm
 t/lib/PluginTestApp/Controller/Root.pm
+t/lib/ScriptTestApp/Script/Bar.pm
+t/lib/ScriptTestApp/Script/CompileTest.pm
+t/lib/ScriptTestApp/Script/Foo.pm
 t/lib/TestApp.pm
 t/lib/TestApp/Action/TestBefore.pm
 t/lib/TestApp/Action/TestMyAction.pm
@@ -196,6 +217,7 @@
 t/lib/TestApp/Controller/Action/Chained/Auto/Foo.pm
 t/lib/TestApp/Controller/Action/Chained/Auto/Forward.pm
 t/lib/TestApp/Controller/Action/Chained/Bar.pm
+t/lib/TestApp/Controller/Action/Chained/CaptureArgs.pm
 t/lib/TestApp/Controller/Action/Chained/Foo.pm
 t/lib/TestApp/Controller/Action/Chained/ParentChain.pm
 t/lib/TestApp/Controller/Action/Chained/ParentChain/Relative.pm
@@ -270,6 +292,8 @@
 t/lib/TestAppClassExceptionSimpleTest.pm
 t/lib/TestAppDoubleAutoBug.pm
 t/lib/TestAppDoubleAutoBug/Controller/Root.pm
+t/lib/TestAppEncoding.pm
+t/lib/TestAppEncoding/Controller/Root.pm
 t/lib/TestAppIndexDefault.pm
 t/lib/TestAppIndexDefault/Controller/Default.pm
 t/lib/TestAppIndexDefault/Controller/IndexChained.pm
@@ -293,6 +317,7 @@
 t/lib/TestAppPluginWithConstructor/Controller/Root.pm
 t/lib/TestAppStats.pm
 t/lib/TestAppStats/Controller/Root.pm
+t/lib/TestAppToTestScripts.pm
 t/lib/TestAppUnknownError.pm
 t/lib/TestAppWithMeta.pm
 t/lib/TestAppWithMeta/Controller/Root.pm

Modified: trunk/libcatalyst-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/META.yml?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/META.yml (original)
+++ trunk/libcatalyst-perl/META.yml Thu Dec  3 02:10:14 2009
@@ -20,29 +20,30 @@
   directory:
     - inc
     - t
-recommends:
-  B::Hooks::OP::Check::StashChange: 0
 requires:
   B::Hooks::EndOfScope: 0.08
   CGI::Simple::Cookie: 0
   Carp: 0
   Class::C3::Adopt::NEXT: 0.07
-  Class::MOP: 0.83
+  Class::MOP: 0.95
   Data::Dump: 0
   HTML::Entities: 0
   HTTP::Body: 1.04
   HTTP::Headers: 1.64
   HTTP::Request: 5.814
-  HTTP::Request::AsCGI: 0.8
+  HTTP::Request::AsCGI: 1.0
   HTTP::Response: 5.813
   LWP::UserAgent: 0
   List::MoreUtils: 0
   MRO::Compat: 0
   Module::Pluggable: 3.9
-  Moose: 0.90
+  Moose: 0.93
   MooseX::Emulate::Class::Accessor::Fast: 0.00903
+  MooseX::Getopt: 0.25
   MooseX::MethodAttributes::Inheritable: 0.17
   MooseX::Role::WithOverloading: 0.03
+  MooseX::Types: 0
+  MooseX::Types::Common::Numeric: 0
   Path::Class: 0.09
   Scalar::Util: 0
   String::RewritePrefix: 0.004
@@ -54,7 +55,7 @@
   Tree::Simple: 1.15
   Tree::Simple::Visitor::FindByPath: 0
   URI: 1.35
-  namespace::autoclean: 0.09
+  namespace::autoclean: 0
   namespace::clean: 0
   perl: 5.8.4
 resources:
@@ -63,4 +64,4 @@
   homepage: http://dev.catalyst.perl.org/
   license: http://dev.perl.org/licenses/
   repository: http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/
-version: 5.80014
+version: 5.80015

Modified: trunk/libcatalyst-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/Makefile.PL?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/Makefile.PL (original)
+++ trunk/libcatalyst-perl/Makefile.PL Thu Dec  3 02:10:14 2009
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use inc::Module::Install 0.87;
+use inc::Module::Install 0.91;
 {   # Ensure that these get used - yes, M::I loads them for us, but if you're
     # in author mode and don't have them installed, then the error is tres
     # cryptic.
@@ -18,10 +18,11 @@
 requires 'List::MoreUtils';
 requires 'namespace::autoclean' => '0.09';
 requires 'namespace::clean';
+requires 'namespace::autoclean';
 requires 'B::Hooks::EndOfScope' => '0.08';
 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
-requires 'Class::MOP' => '0.83';
-requires 'Moose' => '0.90';
+requires 'Class::MOP' => '0.95';
+requires 'Moose' => '0.93';
 requires 'MooseX::MethodAttributes::Inheritable' => '0.17';
 requires 'MooseX::Role::WithOverloading' => '0.03';
 requires 'Carp';
@@ -33,7 +34,7 @@
 requires 'HTTP::Headers' => '1.64';
 requires 'HTTP::Request' => '5.814';
 requires 'HTTP::Response' => '5.813';
-requires 'HTTP::Request::AsCGI' => '0.8';
+requires 'HTTP::Request::AsCGI' => '1.0';
 requires 'LWP::UserAgent';
 requires 'Module::Pluggable' => '3.9';
 requires 'Path::Class' => '0.09';
@@ -47,9 +48,10 @@
 requires 'Task::Weaken';
 requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
 requires 'MRO::Compat';
+requires 'MooseX::Getopt' => '0.25';
+requires 'MooseX::Types';
+requires 'MooseX::Types::Common::Numeric';
 requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
-
-recommends 'B::Hooks::OP::Check::StashChange';
 
 test_requires 'Class::Data::Inheritable';
 test_requires 'Test::Exception';
@@ -65,7 +67,7 @@
         grep { $_ ne 't/aggregate.t' }
         map  { glob } qw[t/*.t t/aggregate/*.t];
 }
-author_requires 'CatalystX::LeakChecker', '0.03'; # Skipped if this isn't installed
+author_requires 'CatalystX::LeakChecker', '0.05'; # Skipped if this isn't installed
 author_requires 'File::Copy::Recursive'; # For http server test
 
 author_tests 't/author';
@@ -113,6 +115,7 @@
 # NOTE - This is the version number of the _incompatible_ code,
 #        not the version number of the fixed version.
 my %conflicts = (
+    'Catalyst::Plugin::SubRequest' => '0.14',
     'Catalyst::Model::Akismet' => '0.02',
     'Catalyst::Component::ACCEPT_CONTEXT' => '0.06',
     'Catalyst::Plugin::ENV' => '9999', # This plugin is just stupid, full stop
@@ -156,7 +159,7 @@
         my $attr = $osx_ver =~ /^10.(5|6)/  ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
 
         makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
-                                          qq{ echo "You must set the ENV variable $attr to true,"; }.
+                                          qq{ echo "You must set the ENV variable $attr to 'true',"; }.
                                           ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
     }
 }

Modified: trunk/libcatalyst-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/debian/changelog?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/debian/changelog (original)
+++ trunk/libcatalyst-perl/debian/changelog Thu Dec  3 02:10:14 2009
@@ -1,10 +1,10 @@
-libcatalyst-perl (5.80014-1) UNRELEASED; urgency=low
+libcatalyst-perl (5.80015-1) UNRELEASED; urgency=low
 
   WAITS-FOR libmoosex-role-withoverloading-perl
 
   * New upstream release
 
- -- Jonathan Yu <jawnsy at cpan.org>  Fri, 20 Nov 2009 18:24:58 -0500
+ -- Jonathan Yu <jawnsy at cpan.org>  Wed, 02 Dec 2009 17:54:54 -0500
 
 libcatalyst-perl (5.80013-1) unstable; urgency=low
 

Modified: trunk/libcatalyst-perl/inc/Module/Install/AuthorRequires.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/inc/Module/Install/AuthorRequires.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/inc/Module/Install/AuthorRequires.pm (original)
+++ trunk/libcatalyst-perl/inc/Module/Install/AuthorRequires.pm Thu Dec  3 02:10:14 2009
@@ -4,13 +4,14 @@
 
 package Module::Install::AuthorRequires;
 
-use base 'Module::Install::Base';
-
 # cargo cult
 BEGIN {
-    our $VERSION = '0.02';
+    our $VERSION = '0.01';
     our $ISCORE  = 1;
+#    our @ISA     = qw{Module::Install::Base};
 }
+
+use base qw/Module::Install::Base/;
 
 sub author_requires {
     my $self = shift;
@@ -35,4 +36,4 @@
 
 __END__
 
-#line 92
+#line 93

Modified: trunk/libcatalyst-perl/lib/Catalyst.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/lib/Catalyst.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/lib/Catalyst.pm (original)
+++ trunk/libcatalyst-perl/lib/Catalyst.pm Thu Dec  3 02:10:14 2009
@@ -4,7 +4,6 @@
 use Moose::Meta::Class ();
 extends 'Catalyst::Component';
 use Moose::Util qw/find_meta/;
-use bytes;
 use B::Hooks::EndOfScope ();
 use Catalyst::Exception;
 use Catalyst::Exception::Detach;
@@ -79,7 +78,7 @@
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.80014';
+our $VERSION = '5.80015';
 
 {
     my $dev_version = $VERSION =~ /_\d{2}$/;
@@ -1793,7 +1792,7 @@
         }
         else {
             # everything should be bytes at this point, but just in case
-            $response->content_length( bytes::length( $response->body ) );
+            $response->content_length( length( $response->body ) );
         }
     }
 
@@ -2587,7 +2586,8 @@
         my $class = ref $proto || $proto;
 
         Class::MOP::load_class( $plugin );
-
+        $class->log->warn( "$plugin inherits from 'Catalyst::Component' - this is decated and will not work in 5.81" )
+            if $plugin->isa( 'Catalyst::Component' );
         $proto->_plugins->{$plugin} = 1;
         unless ($instant) {
             no strict 'refs';
@@ -2892,6 +2892,8 @@
 
 David E. Wheeler
 
+dhoss: Devin Austin <dhoss at cpan.org>
+
 dkubb: Dan Kubb <dan.kubb-cpan at onautopilot.com>
 
 Drew Taylor

Modified: trunk/libcatalyst-perl/lib/Catalyst/Engine.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/lib/Catalyst/Engine.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/lib/Catalyst/Engine.pm (original)
+++ trunk/libcatalyst-perl/lib/Catalyst/Engine.pm Thu Dec  3 02:10:14 2009
@@ -327,7 +327,8 @@
               if exists $appclass->config->{uploadtmp};
         }
 
-        while ( my $buffer = $self->read($c) ) {
+        # Check for definedness as you could read '0'
+        while ( defined ( my $buffer = $self->read($c) ) ) {
             $c->prepare_body_chunk($buffer);
         }
 
@@ -566,6 +567,10 @@
 
 =head2 $self->read($c, [$maxlength])
 
+Reads from the input stream by calling C<< $self->read_chunk >>.
+
+Maintains the read_length and read_position counters as data is read.
+
 =cut
 
 sub read {
@@ -583,6 +588,11 @@
     my $readlen = ( $remaining > $maxlength ) ? $maxlength : $remaining;
     my $rc = $self->read_chunk( $c, my $buffer, $readlen );
     if ( defined $rc ) {
+        if (0 == $rc) { # Nothing more to read even though Content-Length
+                        # said there should be. FIXME - Warn in the log here?
+            $self->finalize_read;
+            return;
+        }
         $self->read_position( $self->read_position + $rc );
         return $buffer;
     }
@@ -595,7 +605,8 @@
 =head2 $self->read_chunk($c, $buffer, $length)
 
 Each engine implements read_chunk as its preferred way of reading a chunk
-of data.
+of data. Returns the number of bytes read. A return of 0 indicates that
+there is no more data to be read.
 
 =cut
 

Modified: trunk/libcatalyst-perl/lib/Catalyst/Engine/CGI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/lib/Catalyst/Engine/CGI.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/lib/Catalyst/Engine/CGI.pm (original)
+++ trunk/libcatalyst-perl/lib/Catalyst/Engine/CGI.pm Thu Dec  3 02:10:14 2009
@@ -85,6 +85,7 @@
     if ( $ENV{SERVER_PORT} == 443 ) {
         $request->secure(1);
     }
+    binmode(STDOUT); # Ensure we are sending bytes.
 }
 
 =head2 $self->prepare_headers($c)
@@ -114,13 +115,16 @@
     my $scheme = $c->request->secure ? 'https' : 'http';
     my $host      = $ENV{HTTP_HOST}   || $ENV{SERVER_NAME};
     my $port      = $ENV{SERVER_PORT} || 80;
+    my $script_name = $ENV{SCRIPT_NAME};
+    $script_name =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go if $script_name;
+
     my $base_path;
     if ( exists $ENV{REDIRECT_URL} ) {
         $base_path = $ENV{REDIRECT_URL};
         $base_path =~ s/$ENV{PATH_INFO}$//;
     }
     else {
-        $base_path = $ENV{SCRIPT_NAME} || '/';
+        $base_path = $script_name || '/';
     }
 
     # If we are running as a backend proxy, get the true hostname
@@ -142,8 +146,22 @@
         }
     }
 
+    # RFC 3875: "Unlike a URI path, the PATH_INFO is not URL-encoded,
+    # and cannot contain path-segment parameters." This means PATH_INFO
+    # is always decoded, and the script can't distinguish / vs %2F.
+    # See https://issues.apache.org/bugzilla/show_bug.cgi?id=35256
+    # Here we try to resurrect the original encoded URI from REQUEST_URI.
+    my $path_info   = $ENV{PATH_INFO};
+    if (my $req_uri = $ENV{REQUEST_URI}) {
+        if (defined $script_name) {
+            $req_uri =~ s/^\Q$script_name\E//;
+        }
+        $req_uri =~ s/\?.*$//;
+        $path_info = $req_uri if $req_uri;
+    }
+
     # set the request URI
-    my $path = $base_path . ( $ENV{PATH_INFO} || '' );
+    my $path = $base_path . ( $path_info || '' );
     $path =~ s{^/+}{};
 
     # Using URI directly is way too slow, so we construct the URLs manually

Modified: trunk/libcatalyst-perl/lib/Catalyst/Engine/FastCGI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/lib/Catalyst/Engine/FastCGI.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/lib/Catalyst/Engine/FastCGI.pm (original)
+++ trunk/libcatalyst-perl/lib/Catalyst/Engine/FastCGI.pm Thu Dec  3 02:10:14 2009
@@ -463,8 +463,8 @@
             fastcgi_param  CONTENT_TYPE       $content_type;
             fastcgi_param  CONTENT_LENGTH     $content_length;
 
+            fastcgi_param  SCRIPT_NAME        /;
             fastcgi_param  PATH_INFO          $fastcgi_script_name;
-            fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
             fastcgi_param  REQUEST_URI        $request_uri;
             fastcgi_param  DOCUMENT_URI       $document_uri;
             fastcgi_param  DOCUMENT_ROOT      $document_root;
@@ -490,14 +490,14 @@
 
 =head3  Non-root configuration
 
-If you properly specify the PATH_INFO and SCRIPT_NAME parameters your 
-application will be accessible at any path.  The SCRIPT_NAME variable is the
+If you properly specify the PATH_INFO and SCRIPT_NAME parameters your
+application will be accessible at any path. The SCRIPT_NAME variable is the
 prefix of your application, and PATH_INFO would be everything in addition.
 
 As an example, if your application is rooted at /myapp, you would configure:
 
-    fastcgi_param  PATH_INFO /myapp/;
-    fastcgi_param  SCRIPT_NAME $fastcgi_script_name;
+    fastcgi_param  SCRIPT_NAME /myapp/;
+    fastcgi_param  PATH_INFO   $fastcgi_script_name;
 
 C<$fastcgi_script_name> would be "/myapp/path/of/the/action".  Catalyst will
 process this accordingly and setup the application base as expected.

Modified: trunk/libcatalyst-perl/lib/Catalyst/Response.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/lib/Catalyst/Response.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/lib/Catalyst/Response.pm (original)
+++ trunk/libcatalyst-perl/lib/Catalyst/Response.pm Thu Dec  3 02:10:14 2009
@@ -150,7 +150,7 @@
 
 This is a convenience method that sets the Location header to the
 redirect destination, and then sets the response status.  You will
-want to C< return; > or C< $c->detach() > to interrupt the normal
+want to C< return > or C<< $c->detach() >> to interrupt the normal
 processing flow if you want the redirect to occur straight away.
 
 =cut

Modified: trunk/libcatalyst-perl/lib/Catalyst/Runtime.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/lib/Catalyst/Runtime.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/lib/Catalyst/Runtime.pm (original)
+++ trunk/libcatalyst-perl/lib/Catalyst/Runtime.pm Thu Dec  3 02:10:14 2009
@@ -7,7 +7,7 @@
 
 # Remember to update this in Catalyst as well!
 
-our $VERSION='5.80014';
+our $VERSION='5.80015';
 
 $VERSION = eval $VERSION;
 

Modified: trunk/libcatalyst-perl/script/catalyst.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/script/catalyst.pl?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/script/catalyst.pl (original)
+++ trunk/libcatalyst-perl/script/catalyst.pl Thu Dec  3 02:10:14 2009
@@ -41,9 +41,10 @@
         '.newfiles' => !$force,
         'makefile'  => $makefile,
         'scripts'   => $scripts,
-        'short'     => 0, # FIXME - to be removed.
+        name => $ARGV[0],
     }
 );
+# Pass $ARGV[0] for compatibility with old ::Devel
 pod2usage(1) unless $helper->mk_app( $ARGV[0] );
 
 1;

Modified: trunk/libcatalyst-perl/t/aggregate/live_component_controller_action_chained.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/aggregate/live_component_controller_action_chained.t?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/aggregate/live_component_controller_action_chained.t (original)
+++ trunk/libcatalyst-perl/t/aggregate/live_component_controller_action_chained.t Thu Dec  3 02:10:14 2009
@@ -906,6 +906,29 @@
             'Choose between a more specific chain and an earlier looser one' );
         is( $response->header('X-Catalyst-Executed') => $expected, 'Executed actions');
         is( $response->content => 'a; anchor.html', 'Content OK' );
+    }
+
+    # CaptureArgs(1) PathPart('...') should win over CaptureArgs(2) PathPart('')
+    {
+        my @expected = qw[
+          TestApp::Controller::Action::Chained->begin
+          TestApp::Controller::Action::Chained::CaptureArgs->base
+          TestApp::Controller::Action::Chained::CaptureArgs->one_arg
+          TestApp::Controller::Action::Chained::CaptureArgs->edit_one_arg
+          TestApp::Controller::Action::Chained::CaptureArgs->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        # should dispatch to /base/one_args/edit_one_arg
+        ok( my $response = request('http://localhost/captureargs/one/edit'),
+            'Correct arg order ran' );
+        TODO: {
+        local $TODO = 'Known bug';
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+        is( $response->content, 'base; one_arg; edit_one_arg', 'Content OK' );
+        }
     }
 
     #

Modified: trunk/libcatalyst-perl/t/aggregate/live_engine_request_escaped_path.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/aggregate/live_engine_request_escaped_path.t?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/aggregate/live_engine_request_escaped_path.t (original)
+++ trunk/libcatalyst-perl/t/aggregate/live_engine_request_escaped_path.t Thu Dec  3 02:10:14 2009
@@ -13,7 +13,7 @@
 
 This test exposes a problem in the handling of PATH_INFO in C::Engine::CGI (and
 other engines) where Catalyst does not un-escape the request correctly.
-If a request is URL-encoded then Catalyst fails to decode the request 
+If a request is URL-encoded then Catalyst fails to decode the request
 and thus will try and match actions using the URL-encoded value.
 
 Can NOT use Catalyst::Test as it uses HTTP::Request::AsCGI which does
@@ -31,11 +31,11 @@
 @@ -157,6 +157,8 @@
      my $query = $ENV{QUERY_STRING} ? '?' . $ENV{QUERY_STRING} : '';
      my $uri   = $scheme . '://' . $host . '/' . $path . $query;
- 
+
 +    $uri = URI->new( $uri )->canonical;
 +
      $c->request->uri( bless \$uri, $uri_class );
- 
+
      # set the base URI
 
 =cut
@@ -54,6 +54,7 @@
 }
 
 # test that request with URL-escaped code works.
+{
     my $request = Catalyst::Utils::request( 'http://localhost/args/param%73/one/two' );
     my $cgi     = HTTP::Request::AsCGI->new( $request, %ENV )->setup;
 
@@ -65,8 +66,6 @@
     TestApp->handle_request( env => \%ENV );
 
     ok( my $response = $cgi->restore->response );
-TODO: {
-    local $TODO = 'Actions should match when path parts are url encoded';
     ok( $response->is_success, 'Response Successful 2xx' );
     is( $response->content, 'onetwo' );
 }

Modified: trunk/libcatalyst-perl/t/aggregate/unit_core_setup_log.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/aggregate/unit_core_setup_log.t?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/aggregate/unit_core_setup_log.t (original)
+++ trunk/libcatalyst-perl/t/aggregate/unit_core_setup_log.t Thu Dec  3 02:10:14 2009
@@ -8,7 +8,6 @@
 
 sub mock_app {
     my $name = shift;
-    print "Setting up mock application: $name\n";
     my $meta = Moose->init_meta( for_class => $name );
     $meta->superclasses('Catalyst');
     return $meta->name;

Modified: trunk/libcatalyst-perl/t/author/http-server.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/author/http-server.t?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/author/http-server.t (original)
+++ trunk/libcatalyst-perl/t/author/http-server.t Thu Dec  3 02:10:14 2009
@@ -32,7 +32,7 @@
 # spawn the standalone HTTP server
 my $port = 30000 + int rand(1 + 10000);
 my @cmd = ($^X, "-I$FindBin::Bin/../../lib",
-  "$FindBin::Bin/../../t/tmp/TestApp/script/testapp_server.pl", '-port', $port );
+  "$FindBin::Bin/../../t/tmp/TestApp/script/testapp_server.pl", '--port', $port );
 my $pid = open3( undef, my $server, undef, @cmd)
     or die "Unable to spawn standalone HTTP server: $!";
 

Modified: trunk/libcatalyst-perl/t/deprecated.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/deprecated.t?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/deprecated.t (original)
+++ trunk/libcatalyst-perl/t/deprecated.t Thu Dec  3 02:10:14 2009
@@ -9,7 +9,10 @@
 my $warnings;
 BEGIN { # Do this at compile time in case we generate a warning when use
         # DeprecatedTestApp
-    $SIG{__WARN__} = sub { $warnings++ if $_[0] =~ /trying to use NEXT/ };
+    $SIG{__WARN__} = sub {
+        $warnings++ if $_[0] =~ /uses NEXT, which is deprecated/;
+        $warnings++ if $_[0] =~ /trying to use NEXT, which is deprecated/;
+    };
 }
 use Catalyst; # Cause catalyst to be used so I can fiddle with the logging.
 my $mvc_warnings;

Modified: trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Deprecated.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Deprecated.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Deprecated.pm (original)
+++ trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Deprecated.pm Thu Dec  3 02:10:14 2009
@@ -2,7 +2,6 @@
 
 use strict;
 use warnings;
-use NEXT;
 
 sub prepare {
     my $class = shift;

Modified: trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Plugin.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Plugin.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Plugin.pm (original)
+++ trunk/libcatalyst-perl/t/lib/Catalyst/Plugin/Test/Plugin.pm Thu Dec  3 02:10:14 2009
@@ -4,7 +4,7 @@
 use warnings;
 use MRO::Compat;
 
-use base qw/Catalyst::Controller Class::Data::Inheritable/;
+use base qw/Class::Data::Inheritable/;
 
  __PACKAGE__->mk_classdata('ran_setup');
 

Modified: trunk/libcatalyst-perl/t/lib/TestApp/Controller/Root.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/lib/TestApp/Controller/Root.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/lib/TestApp/Controller/Root.pm (original)
+++ trunk/libcatalyst-perl/t/lib/TestApp/Controller/Root.pm Thu Dec  3 02:10:14 2009
@@ -1,5 +1,6 @@
 package TestApp::Controller::Root;
-
+use strict;
+use warnings;
 use base 'Catalyst::Controller';
 
 __PACKAGE__->config->{namespace} = '';

Modified: trunk/libcatalyst-perl/t/lib/TestAppPluginWithConstructor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/lib/TestAppPluginWithConstructor.pm?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/lib/TestAppPluginWithConstructor.pm (original)
+++ trunk/libcatalyst-perl/t/lib/TestAppPluginWithConstructor.pm Thu Dec  3 02:10:14 2009
@@ -4,7 +4,7 @@
 use Test::Exception;
 use Catalyst qw/+TestPluginWithConstructor/;
 use Moose;
-BEGIN { extends qw/Catalyst Catalyst::Controller/ } # Ewww, FIXME.
+extends qw/Catalyst/;
 
 __PACKAGE__->setup;
 our $MODIFIER_FIRED = 0;

Modified: trunk/libcatalyst-perl/t/live_component_controller_context_closure.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/live_component_controller_context_closure.t?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/live_component_controller_context_closure.t (original)
+++ trunk/libcatalyst-perl/t/live_component_controller_context_closure.t Thu Dec  3 02:10:14 2009
@@ -3,8 +3,8 @@
 use Test::More;
 
 BEGIN {
-    unless (eval 'use CatalystX::LeakChecker 0.03; 1') {
-        plan skip_all => 'CatalystX::LeakChecker 0.03 required for this test';
+    unless (eval 'use CatalystX::LeakChecker 0.05; 1') {
+        plan skip_all => 'CatalystX::LeakChecker 0.05 required for this test';
     }
 
     plan tests => 4;

Modified: trunk/libcatalyst-perl/t/live_fork.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcatalyst-perl/t/live_fork.t?rev=48133&op=diff
==============================================================================
--- trunk/libcatalyst-perl/t/live_fork.t (original)
+++ trunk/libcatalyst-perl/t/live_fork.t Thu Dec  3 02:10:14 2009
@@ -26,7 +26,6 @@
 plan tests => 13; # otherwise
 
 {
-  system:
     ok(my $result = get('/fork/system/%2Fbin%2Fls'), 'system');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
@@ -37,7 +36,6 @@
 }
 
 {
-  backticks:
     ok(my $result = get('/fork/backticks/%2Fbin%2Fls'), '`backticks`');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
@@ -49,7 +47,6 @@
     like($result_ref->{result}, qr{\n.*\n}m, 'contains two newlines');
 }
 {
-  fork:
     ok(my $result = get('/fork/fork'), 'fork');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];




More information about the Pkg-perl-cvs-commits mailing list