use HTTP::Status qw(status_message);
use HTTP::Date qw(time2str);
use Scalar::Util qw(weaken);
-use IO::File;
+use IO::Handle;
use constant {
CHUNK_START => -1, # [a-f0-9]+\r\n
CHUNK_END => -2, # \r\n
our $MAX_REQUEST_BUFFER = $ENV{GIT_HTTP_MAX_REQUEST_BUFFER} ||
(10 * 1024 * 1024);
-my $null_io = IO::File->new('/dev/null', '<');
+open(my $null_io, '<', '/dev/null') or die "failed to open /dev/null: $!";
my $http_date;
my $prev = 0;
sub http_date () {
quit($self, 413);
return;
}
- $input = IO::File->new_tmpfile;
+ open($input, '+>', undef);
} elsif (env_chunked($env)) {
$len = CHUNK_START;
- $input = IO::File->new_tmpfile;
+ open($input, '+>', undef);
}
# TODO: expire idle clients on ENFILE / EMFILE