diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:18:55 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:27:04 -0700 |
| commit | e131b1f71f08b69abb832c1687d1f29682d171f8 (patch) | |
| tree | 490167e41d9fe05b760e7b21a96ee35a86f8edda /rt/t/data/plugins | |
| parent | d05d7346bb2387fd9d0354923d577275c5c7f019 (diff) | |
RT 4.2.11, ticket#13852
Diffstat (limited to 'rt/t/data/plugins')
| -rw-r--r-- | rt/t/data/plugins/RT-Extension-PSGIWrap/lib/RT/Extension/PSGIWrap.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rt/t/data/plugins/RT-Extension-PSGIWrap/lib/RT/Extension/PSGIWrap.pm b/rt/t/data/plugins/RT-Extension-PSGIWrap/lib/RT/Extension/PSGIWrap.pm new file mode 100644 index 000000000..1d0a55e33 --- /dev/null +++ b/rt/t/data/plugins/RT-Extension-PSGIWrap/lib/RT/Extension/PSGIWrap.pm @@ -0,0 +1,16 @@ +package RT::Extension::PSGIWrap; + +use base 'Plack::Middleware'; + +sub call { + my ( $self, $env ) = @_; + my $res = $self->app->($env); + return $self->response_cb( $res, sub { + my $headers = shift->[1]; + Plack::Util::header_set($headers, 'X-RT-PSGIWrap' => '1'); + } ); +} + +sub PSGIWrap { return shift->wrap(@_) } + +1; |
