Added SpeedyCGI, partly fixed HTTP::Daemon
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / CGI / Base.pm
index 0f1152b..3b62454 100644 (file)
@@ -6,8 +6,6 @@ use base 'Catalyst::Engine';
 use URI;
 use URI::http;
 
-__PACKAGE__->mk_accessors('cgi');
-
 =head1 NAME
 
 Catalyst::Engine::CGI::Base - Base class for CGI Engines
@@ -16,16 +14,6 @@ Catalyst::Engine::CGI::Base - Base class for CGI Engines
 
 This is a base class for CGI engines.
 
-=head1 METHODS
-
-=over 4
-
-=item $c->cgi
-
-This config parameter contains the C<CGI> object.
-
-=back
-
 =head1 OVERLOADED METHODS
 
 This class overloads some methods from C<Catalyst::Engine>.
@@ -56,6 +44,22 @@ sub finalize_headers {
     print "\015\012";
 }
 
+=item $c->prepare_body
+
+=cut
+
+sub prepare_body {
+    my $c = shift;
+    
+    my $body = undef;
+    
+    while ( read( STDIN, my $buffer, 8192 ) ) {
+        $body .= $buffer;
+    }
+    
+    $c->request->body($body);
+}
+
 =item $c->prepare_connection
 
 =cut