# This file documents the revision history for Perl extension Catalyst.
+ - Add TODO tests for calling $c->req->body from inside an overridden
+ prepare_action method in a plugin, as used by
+ Catalyst::Plugin::Server (t0m)
- Fix assignment to Catalyst::Dispatcher's preload_dispatch_types and
postload_dispatch_types attributes - assigning a list should later
return a listref. Fixes Catalyst::Plugin::Server. (t0m)
- Tests for this (t0m)
- - Change streaming test to serve itself rather than 01use.t, making test
- sync for engines easier (t0m)
+ - Change streaming test to serve itself rather than 01use.t, making
+ test sync for engines easier (t0m)
- Refactor capturing of $app from Catalyst::Controller into
Catalyst::Component::Role::CaptureApp for easier reuse in other
components (Florian Ragwitz)
Back-compat investigation / known issues:
+ - Catalyst::Plugin::Server is still buggered in various ways..
+ - Fix TODO tests in t/aggregate/live_engine_request_body.t
+
- Common engine test failures, look into and get tests into core.
- CatalystX-Imports, Class::MOP doesn't consider anon subs in the symbol
is( $creq->content_length, $request->content_length,
'Catalyst::Request Content-Length' );
}
+
+# 5.80 regression, see note in Catalyst::Plugin::Test::Plugin
+TODO: {
+ local $TODO = 'On demand request body parsing in prepare_action broken';
+
+ my $request = GET(
+ 'http://localhost/have_req_body_in_prepare_action',
+ 'Content-Type' => 'text/plain',
+ 'Content' => 'x' x 100_000
+ );
+
+ ok( my $response = request($request), 'Request' );
+ ok( $response->is_success, 'Response Successful 2xx' );
+ like( $response->content, qr/^[1-9]/, 'Has body' );
+}
+
package Catalyst::Plugin::Test::Plugin;
use strict;
+use warnings;
+use Class::C3;
use base qw/Catalyst::Base Class::Data::Inheritable/;
}
+# Note: This is horrible, but Catalyst::Plugin::Server forces the body to
+# be parsed, by calling the $c->req->body method in prepare_action.
+# We need to test this, as this was broken by 5.80. See also
+# t/aggregate/live_engine_request_body.t. Better ways to test this
+# appreciated if you have suggestions :)
+{
+ my $have_req_body = 0;
+ sub prepare_action {
+ my $c = shift;
+ $have_req_body++ if $c->req->body;
+ $c->next::method(@_);
+ }
+ sub have_req_body_in_prepare_action : Local {
+ my ($self, $c) = @_;
+ $c->res->body($have_req_body);
+ }
+}
+
sub end : Private {
my ($self,$c) = @_;
}