use Catalyst 'My::Module';
-Special flags like -Debug and -Engine can also be specifed as arguments when
+Special flags like -Debug and -Engine can also be specified as arguments when
Catalyst is loaded:
use Catalyst qw/-Debug My::Module/;
arguments => [],
body_parameters => {},
cookies => {},
- handle => \*STDIN,
headers => HTTP::Headers->new,
parameters => {},
query_parameters => {},
{
body => '',
cookies => {},
- handle => \*STDOUT,
headers => HTTP::Headers->new(),
status => 200
}
}
}
+=item $c->prepare_body_chunk( $chunk )
+
+Prepare a chunk of data before sending it to HTTP::Body.
+
+=cut
+
+sub prepare_body_chunk {
+ my $c = shift;
+ $c->engine->prepare_body_chunk( $c, @_ );
+}
+
=item $c->prepare_body_parameters
Prepare body parameters.
=cut
-sub write { my $c = shift; return $c->engine->write( $c, @_ ) }
+sub write {
+ my $c = shift;
+
+ # Finalize headers if someone manually writes output
+ $c->finalize_headers;
+
+ return $c->engine->write( $c, @_ );
+}
=back
Ulf Edvinsson
+Yuval Kogman
+
=head1 AUTHOR
Sebastian Riedel, C<sri@oook.de>