New upstream version 2.3.3

This commit is contained in:
Jan Wagner 2023-02-02 09:13:25 +00:00
parent 21323d25dd
commit e7bdd1c6c6
49 changed files with 13068 additions and 34075 deletions

View file

@ -21,7 +21,7 @@ use FindBin qw($Bin);
$ENV{'LC_TIME'} = "C";
my $common_tests = 72;
my $common_tests = 73;
my $ssl_only_tests = 8;
# Check that all dependent modules are available
eval "use HTTP::Daemon 6.01;";
@ -200,6 +200,14 @@ sub run_server {
$c->send_basic_header;
$c->send_crlf;
$c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host')));
} elsif ($r->url->path eq "/chunked") {
my $chunks = ["chunked", "encoding", "test\n"];
$c->send_response(HTTP::Response->new( 200, 'OK', undef, sub {
my $chunk = shift @{$chunks};
return unless $chunk;
sleep(1);
return($chunk);
}));
} else {
$c->send_error(HTTP::Status->RC_FORBIDDEN);
}
@ -472,7 +480,8 @@ sub run_common_tests {
local $SIG{ALRM} = sub { die "alarm\n" };
alarm(2);
$result = NPTest->testCmd( $cmd );
alarm(0); };
};
alarm(0);
isnt( $@, "alarm\n", $cmd );
is( $result->return_code, 0, $cmd );
@ -482,7 +491,8 @@ sub run_common_tests {
local $SIG{ALRM} = sub { die "alarm\n" };
alarm(2);
$result = NPTest->testCmd( $cmd );
alarm(0); };
};
alarm(0);
isnt( $@, "alarm\n", $cmd );
isnt( $result->return_code, 0, $cmd );
@ -508,4 +518,9 @@ sub run_common_tests {
};
is( $@, "", $cmd );
$cmd = "$command -u /chunked -s 'chunkedencodingtest' -d 'Transfer-Encoding: chunked'";
eval {
$result = NPTest->testCmd( $cmd, 5 );
};
is( $@, "", $cmd );
}