=head1 DESCRIPTION
-This is the Catalyst engine specialized for Apache (i.e. for mod_perl).
+This is a base class engine specialized for Apache (i.e. for mod_perl).
=head1 METHODS
sub prepare_connection {
my $c = shift;
- $c->request->hostname( $c->apache->connection->remote_host );
$c->request->address( $c->apache->connection->remote_ip );
+ $c->request->hostname( $c->apache->connection->remote_host );
+ $c->request->protocol( $c->apache->protocol );
+
+ if ( $ENV{HTTPS} ) {
+ $c->request->secure(1);
+ }
}
=item $c->prepare_headers
sub prepare_parameters {
my $c = shift;
- foreach my $key ( $c->apache->param ) {
- my @values = $c->apache->param($key);
- $c->req->parameters->{$key} = ( @values == 1 ) ? $values[0] : \@values;
- }
+ my @params;
+
+ $c->apache->param->do( sub {
+ my ( $field, $value ) = @_;
+ push( @params, $field, $value );
+ return 1;
+ });
+
+ $c->request->param(@params);
}
=item $c->prepare_path
=head1 AUTHOR
Sebastian Riedel, C<sri@cpan.org>
+Christian Hansen C<ch@ngmedia.com>
=head1 COPYRIGHT