1 package Catalyst::Engine::Apache::MP13;
4 use base 'Catalyst::Engine::Apache';
7 use Apache::Constants ();
8 use Apache::Request ();
11 Apache::Constants->import(':common');
15 Catalyst::Engine::Apache::MP13 - Catalyst Apache MP1.3 Engine
23 This is the Catalyst engine specialized for Apache mod_perl version 1.
25 =head1 OVERLOADED METHODS
27 This class overloads some methods from C<Catalyst::Engine::Apache>.
31 =item $c->finalize_headers
35 sub finalize_headers {
38 for my $name ( $c->response->headers->header_field_names ) {
39 next if $name =~ /Content-Type/i;
40 my @values = $c->response->header($name);
41 $c->apache->headers_out->add( $name => $_ ) for @values;
44 if ( $c->response->header('Set-Cookie') && $c->response->status >= 300 ) {
45 my @values = $c->response->header('Set-Cookie');
46 $c->apache->err_headers_out->add( 'Set-Cookie' => $_ ) for @values;
49 $c->apache->status( $c->response->status );
50 $c->apache->content_type( $c->response->header('Content-Type') );
52 $c->apache->send_http_header;
62 shift->SUPER::handler(@_);
65 =item $c->prepare_uploads
74 for my $upload ( $c->apache->upload ) {
76 my $object = Catalyst::Request::Upload->new(
77 filename => $upload->filename,
78 size => $upload->size,
79 tempname => $upload->tempname,
83 push( @uploads, $upload->name, $object );
86 $c->req->_assign_values( $c->req->uploads, \@uploads );
93 L<Catalyst>, L<Catalyst::Engine>, L<Catalyst::Engine::Apache>.
97 Sebastian Riedel, C<sri@cpan.org>
101 This program is free software, you can redistribute it and/or modify it under
102 the same terms as Perl itself.