return;
}
-=head2 $self->finalize_read($c)
-
-=cut
-
-sub finalize_read { }
-
=head2 $self->finalize_uploads($c)
Clean up after uploads, deleting temp files.
# paranoia against wrong Content-Length header
my $remaining = $length - $c->request->_read_position;
if ( $remaining > 0 ) {
- $self->finalize_read($c);
Catalyst::Exception->throw(
"Wrong Content-Length value: $length" );
}
# Are we done reading?
if ( $remaining <= 0 ) {
- $self->finalize_read($c);
return;
}
if ( defined $rc ) {
if (0 == $rc) { # Nothing more to read even though Content-Length
# said there should be.
- $self->finalize_read;
return;
}
my $request = $c->request;
}
}
-=head2 $self->read_chunk($c, $buffer, $length)
+=head2 $self->read_chunk($c, \$buffer, $length)
Each engine implements read_chunk as its preferred way of reading a chunk
of data. Returns the number of bytes read. A return of 0 indicates that
sub read_chunk {
my ($self, $ctx) = (shift, shift);
- return $ctx->request->env->{'psgi.input'}->read(@_);
+ return $ctx->request->read_chunk(@_);
}
=head2 $self->read_length