]> git.etc.gen.nz Git - spong.git/commitdiff
fix to HTTP/1.1 code check for problem in IIS
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 7 Nov 2000 06:37:14 +0000 (06:37 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 7 Nov 2000 06:37:14 +0000 (06:37 +0000)
src/lib/Spong/Network/plugins/check_http

index ba67bd4238c8d027189f152a0a817c84f23c624d..31dbb9f098689f23be58b9cdaeafa15680d4f3da 100755 (executable)
@@ -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";
       }
    }