From: Stephen L Johnson Date: Tue, 7 Nov 2000 06:37:14 +0000 (+0000) Subject: fix to HTTP/1.1 code check for problem in IIS X-Git-Tag: spong-2_7_1~8 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b429dd128fbb9ecc44be12596cb2d6e2781c81fb;p=spong.git fix to HTTP/1.1 code check for problem in IIS --- diff --git a/src/lib/Spong/Network/plugins/check_http b/src/lib/Spong/Network/plugins/check_http index ba67bd4..31dbb9f 100755 --- a/src/lib/Spong/Network/plugins/check_http +++ b/src/lib/Spong/Network/plugins/check_http @@ -33,7 +33,7 @@ sub check_http { my $message = &check_tcp( $hname, $port, - "HEAD $urlpath HTTP/1.1\r\nHost: $host:$port\r\n\r\n" ); + "HEAD $urlpath HTTP/1.1\r\nHost: $hname:$port\r\n\r\n" ); if( $message =~ /HTTP\S+\s+(\d\d\d)\s.*$/m ) { my $code = $1; @@ -54,7 +54,7 @@ sub check_http { if( $color ne "red" ) { $color = "yellow"; $summary = "can't determine status code";} } - $tmessage .= "->HEAD $urlpath HTTP/1.1\nHost: $hname:$port\n$message\n"; + $tmessage .= "->HEAD $urlpath HTTP/1.1\nHost: $hname:$port\n$message\n\n"; } } else { @@ -83,7 +83,7 @@ sub check_http { if( $color ne "red" ) { $color = "yellow"; $summary = "can't determine status code";} } - $tmessage .= "->HEAD $file HTTP/1.0\n$message\n"; + $tmessage .= "->HEAD $file HTTP/1.0\n$message\n\n"; } }