Commit | Line | Data |
---|---|---|
2ecb3b2b | 1 | package Catalyst::TraitFor::Context::TestPluginServer; |
2 | ||
3 | use 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 | ||
10 | after prepare_action => sub { | |
11 | my $c = shift; | |
12 | $c->res->header('X-Have-Request-Body', 1) if $c->req->body; | |
13 | }; | |
14 | ||
15 | 1; |