Commit | Line | Data |
e646f111 |
1 | package Catalyst::Engine::CGI::NPH; |
2 | |
3 | use strict; |
4 | use base 'Catalyst::Engine::CGI'; |
5 | |
c038f8ff |
6 | use HTTP::Status (); |
7 | |
e646f111 |
8 | =head1 NAME |
9 | |
10 | Catalyst::Engine::CGI::NPH - Catalyst CGI Engine |
11 | |
12 | =head1 SYNOPSIS |
13 | |
14 | See L<Catalyst>. |
15 | |
16 | =head1 DESCRIPTION |
17 | |
18 | This Catalyst engine returns a complete HTTP response message. |
19 | |
20 | =head1 OVERLOADED METHODS |
21 | |
22 | This class overloads some methods from C<Catalyst::Engine::CGI>. |
23 | |
24 | =over 4 |
25 | |
26 | =item $c->finalize_headers |
27 | |
28 | =cut |
29 | |
30 | sub finalize_headers { |
31 | my $c = shift; |
c038f8ff |
32 | |
33 | my $status = $c->response->status || 200; |
169a391e |
34 | printf( "%d %s\015\012", $status, HTTP::Status::status_message($status) ); |
c038f8ff |
35 | $c->SUPER::finalize_headers; |
e646f111 |
36 | } |
37 | |
38 | =back |
39 | |
40 | =head1 SEE ALSO |
41 | |
42 | L<Catalyst>, L<Catalyst::Engine::CGI>. |
43 | |
44 | =head1 AUTHOR |
45 | |
46 | Sebastian Riedel, C<sri@cpan.org> |
47 | Christian Hansen, C<ch@ngmedia.com> |
48 | |
49 | =head1 COPYRIGHT |
50 | |
51 | This program is free software, you can redistribute it and/or modify it under |
52 | the same terms as Perl itself. |
53 | |
54 | =cut |
55 | |
56 | 1; |