X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FCGI.pm;h=28400348049f832a5f967edb382b534e98d59f11;hp=28e9ac027b50978b83cc3f954cb61c2bc9769ff7;hb=06e1b6164a2c9d7b463f358b0d1934ef83a82845;hpb=b160463fabb0b2c1d0914427e2265ee8152efb46 diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index 28e9ac0..2840034 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -57,6 +57,17 @@ This class overloads some methods from C. =over 4 +=item $c->finalize_body + +Prints the response output to STDOUT. + +=cut + +sub finalize_body { + my $c = shift; + print $c->response->output; +} + =item $c->finalize_headers =cut @@ -70,15 +81,18 @@ sub finalize_headers { print "\015\012"; } -=item $c->finalize_output - -Prints the response output to STDOUT. +=item $c->prepare_body =cut -sub finalize_output { +sub prepare_body { my $c = shift; - print $c->response->output; + + # XXX this is undocumented in CGI.pm. If Content-Type is not + # application/x-www-form-urlencoded or multipart/form-data + # CGI.pm will read STDIN into a param, POSTDATA. + + $c->request->input( $c->cgi->param('POSTDATA') ); } =item $c->prepare_connection