(Changeset Tracker. See #1234.)

This commit is contained in:
brectanus
2008-05-30 15:26:44 +00:00
parent c8e35797fd
commit 81145fe2b9
7 changed files with 660 additions and 16 deletions

View File

@@ -412,7 +412,7 @@ sub match_file {
my($neg,$fn) = ($_[0] =~ m/^(-?)(.*)$/);
unless (exists $FILE{$fn}) {
$FILE{$fn}{fn} = $fn;
$FILE{$fn}{fd} = new FileHandle($fn, O_RDWR|O_CREAT);
$FILE{$fn}{fd} = new FileHandle($fn, O_RDONLY);
$FILE{$fn}{fd}->blocking(0);
$FILE{$fn}{buf} = "";
}
@@ -663,20 +663,6 @@ sub httpd_reset_fd {
}
}
# Any extras listed in "match_file"
if ($t and exists $t->{match_file}) {
for my $k (keys %{ $t->{match_file} || {} }) {
my($neg,$fn) = ($k =~ m/^(-?)(.*)$/);
next if (!$fn or exists $FILE{$fn});
#dbg("Opening file: $fn");
$FILE{$fn}{fn} = $fn;
$FILE{$fn}{fd} = new FileHandle($fn, O_RDWR|O_CREAT);
$FILE{$fn}{fd}->blocking(0);
$FILE{$fn}{buf} = "";
}
}
}
sub encode_chunked {