# Never ever remove this, it would result in random length output
# streams if STDIN eq STDOUT (like in the HTTP engine)
- $c->request->handle->blocking(1);
+ *STDIN->blocking(1);
return $self->NEXT::finalize_read($c);
}
my ( $self, $c ) = @_;
# Set the input handle to non-blocking
- $c->request->handle->blocking(0);
+ *STDIN->blocking(0);
return $self->NEXT::prepare_read($c);
}
my $c = shift;
# support for non-blocking IO
- my $handle = $c->request->handle;
- my $rin = '';
- vec( $rin, $handle->fileno, 1 ) = 1;
+ my $rin = '';
+ vec( $rin, *STDIN->fileno, 1 ) = 1;
READ:
{
select( $rin, undef, undef, undef );
- my $rc = $handle->sysread(@_);
+ my $rc = *STDIN->sysread(@_);
if ( defined $rc ) {
return $rc;
}
# Ignore broken pipes as an HTTP server should
local $SIG{PIPE} = sub { close Remote };
- local $SIG{HUP} = (defined $pid ? 'IGNORE' : $SIG{HUP});
+ local $SIG{HUP} = ( defined $pid ? 'IGNORE' : $SIG{HUP} );
local *STDIN = \*Remote;
local *STDOUT = \*Remote;