prepare_action is in context (t/aggregate/live_engine_request_body.t)
[catagits/Catalyst-Runtime.git] / t / lib / Catalyst / TraitFor / Context / TestPluginServer.pm
CommitLineData
2ecb3b2b 1package Catalyst::TraitFor::Context::TestPluginServer;
2
3use Moose::Role;
4
5# Note: Catalyst::Plugin::Server forces the body to
6# be parsed, by calling the $c->req->body method in prepare_action.
7# We need to test this, as this was broken by 5.80. See also
8# t/aggregate/live_engine_request_body.t.
9
10after prepare_action => sub {
11 my $c = shift;
12 $c->res->header('X-Have-Request-Body', 1) if $c->req->body;
13};
14
151;