[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 11/13: check_httpd_status-digest: make -r option work
Bernd Zeimetz
bernd at bzed.de
Tue Jan 3 13:12:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
bzed pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.
commit ed6148ebe49b560b164f01a6bdf778d18aa0ea9d
Author: Bernd Zeimetz <bernd at bzed.de>
Date: Tue Jan 3 14:09:17 2017 +0100
check_httpd_status-digest: make -r option work
Resolves #61
Thanks: Michael Weinrich
---
debian/patches/check_httpd_status/htdigest_auth | 17 +++++++++++++++++
debian/patches/series | 1 +
2 files changed, 18 insertions(+)
diff --git a/debian/patches/check_httpd_status/htdigest_auth b/debian/patches/check_httpd_status/htdigest_auth
new file mode 100644
index 0000000..336b542
--- /dev/null
+++ b/debian/patches/check_httpd_status/htdigest_auth
@@ -0,0 +1,17 @@
+--- a/check_httpd_status/check_httpd_status
++++ b/check_httpd_status/check_httpd_status
+@@ -213,7 +213,13 @@
+ logD("Web URL : $url");
+
+ my $req = HTTP::Request->new( GET => $url );
+-if ( defined($o_user) ) {
++if ( defined($o_realm) ) {
++ if ( ! defined($o_port) ) {
++ $o_port = 80;
++ }
++ $ua->credentials("$o_host:$o_port", $o_realm, $o_user, $o_pass);
++}
++elsif ( defined($o_user) ) {
+ $req->authorization_basic($o_user, $o_pass);
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index b396bbe..e188e1b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -48,3 +48,4 @@ dsa/check_packages_,_fix
check_cups/ParseDateDelta
check_printer/epn
check_nfsmounts/nfs4_support
+check_httpd_status/htdigest_auth
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git
More information about the Pkg-nagios-changes
mailing list