| 1 |
Index: pkg-nagios-plugins-contrib/check_httpd_status/check_httpd_status |
| 2 |
=================================================================== |
| 3 |
--- pkg-nagios-plugins-contrib.orig/check_httpd_status/check_httpd_status |
| 4 |
+++ pkg-nagios-plugins-contrib/check_httpd_status/check_httpd_status |
| 5 |
@@ -213,7 +213,13 @@ $ua->agent($PROGNAME.'-'.$VERSION); |
| 6 |
logD("Web URL : $url"); |
| 7 |
|
| 8 |
my $req = HTTP::Request->new( GET => $url ); |
| 9 |
-if ( defined($o_user) ) { |
| 10 |
+if ( defined($o_realm) ) { |
| 11 |
+ if ( ! defined($o_port) ) { |
| 12 |
+ $o_port = 80; |
| 13 |
+ } |
| 14 |
+ $ua->credentials("$o_host:$o_port", $o_realm, $o_user, $o_pass); |
| 15 |
+} |
| 16 |
+elsif ( defined($o_user) ) { |
| 17 |
$req->authorization_basic($o_user, $o_pass); |
| 18 |
} |
| 19 |
|