1 package Catalyst::Engine::CGI::NPH;
4 use base 'Catalyst::Engine::CGI';
8 Catalyst::Engine::CGI::NPH - Catalyst CGI Engine
16 This Catalyst engine returns a complete HTTP response message.
18 =head1 OVERLOADED METHODS
20 This class overloads some methods from C<Catalyst::Engine::CGI>.
24 =item $c->finalize_headers
28 sub finalize_headers {
30 my %headers = ( -nph => 1 );
31 $headers{-status} = $c->response->status if $c->response->status;
32 for my $name ( $c->response->headers->header_field_names ) {
33 $headers{"-$name"} = $c->response->headers->header($name);
36 while ( my ( $name, $cookie ) = each %{ $c->response->cookies } ) {
37 push @cookies, $c->cgi->cookie(
39 -value => $cookie->{value},
40 -expires => $cookie->{expires},
41 -domain => $cookie->{domain},
42 -path => $cookie->{path},
43 -secure => $cookie->{secure} || 0
46 $headers{-cookie} = \@cookies if @cookies;
47 print $c->cgi->header(%headers);
54 L<Catalyst>, L<Catalyst::Engine::CGI>.
58 Sebastian Riedel, C<sri@cpan.org>
59 Christian Hansen, C<ch@ngmedia.com>
63 This program is free software, you can redistribute it and/or modify it under
64 the same terms as Perl itself.