summaryrefslogtreecommitdiffstats
path: root/plugins/tests/check_http.t
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2022-12-22 13:58:01 (GMT)
committerSven Nierlein <sven@nierlein.org>2023-01-07 17:34:46 (GMT)
commit07561a67abb02688955433db5b4a38b23523a754 (patch)
tree7a2dd12a4db03132e79d8fbf6a8ae7e25c3985b3 /plugins/tests/check_http.t
parentc256af44fb23a4749faa5f3fce167a9d9a4367d7 (diff)
downloadmonitoring-plugins-07561a67abb02688955433db5b4a38b23523a754.tar.gz
tests: fix chunked encoding test server
Diffstat (limited to 'plugins/tests/check_http.t')
-rwxr-xr-xplugins/tests/check_http.t7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t
index 132c665..d766ac3 100755
--- a/plugins/tests/check_http.t
+++ b/plugins/tests/check_http.t
@@ -12,7 +12,7 @@ use FindBin qw($Bin);
12 12
13$ENV{'LC_TIME'} = "C"; 13$ENV{'LC_TIME'} = "C";
14 14
15my $common_tests = 72; 15my $common_tests = 71;
16my $virtual_port_tests = 8; 16my $virtual_port_tests = 8;
17my $ssl_only_tests = 12; 17my $ssl_only_tests = 12;
18# Check that all dependent modules are available 18# Check that all dependent modules are available
@@ -191,9 +191,6 @@ sub run_server {
191 $c->send_crlf; 191 $c->send_crlf;
192 $c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host'))); 192 $c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host')));
193 } elsif ($r->url->path eq "/chunked") { 193 } elsif ($r->url->path eq "/chunked") {
194 $c->send_basic_header;
195 $c->send_header('Transfer-Encoding', "chunked");
196 $c->send_crlf;
197 my $chunks = ["chunked", "encoding", "test\n"]; 194 my $chunks = ["chunked", "encoding", "test\n"];
198 $c->send_response(HTTP::Response->new( 200, 'OK', undef, sub { 195 $c->send_response(HTTP::Response->new( 200, 'OK', undef, sub {
199 my $chunk = shift @{$chunks}; 196 my $chunk = shift @{$chunks};
@@ -508,7 +505,7 @@ sub run_common_tests {
508 }; 505 };
509 is( $@, "", $cmd ); 506 is( $@, "", $cmd );
510 507
511 $cmd = "$command -u /chunked -s 'chunkedencodingtest'"; 508 $cmd = "$command -u /chunked -s 'chunkedencodingtest' -d 'Transfer-Encoding: chunked'";
512 eval { 509 eval {
513 $result = NPTest->testCmd( $cmd, 5 ); 510 $result = NPTest->testCmd( $cmd, 5 );
514 }; 511 };