Module: check_mk
Branch: master
Commit: b7bd87d4dae634668594db08792852275afa1320
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7bd87d4dae634…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Mon Apr 14 11:33:11 2014 +0200
FIX apache_status: now also sends an accept header to make it work with mod_security
enables servers
---
.werks/606 | 8 ++++++++
ChangeLog | 1 +
agents/plugins/apache_status | 3 ++-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/606 b/.werks/606
new file mode 100644
index 0000000..442d91f
--- /dev/null
+++ b/.werks/606
@@ -0,0 +1,8 @@
+Title: apache_status: now also sends an accept header to make it work with mod_security
enables servers
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1397467941
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 3d936f0..6360411 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
* 0605 FIX: enterasys_cpu_util enterasys_lsnat: syntax fixes
* 0889 FIX: logwatch: fix case where rule wouldn't be applied...
* 0882 FIX: check_bi_local.py: fix crash in case of non-ascii characters...
+ * 0606 FIX: apache_status: now also sends an accept header to make it work with
mod_security enables servers
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled
by filter)
diff --git a/agents/plugins/apache_status b/agents/plugins/apache_status
index f2bd8fa..0b91371 100755
--- a/agents/plugins/apache_status
+++ b/agents/plugins/apache_status
@@ -103,7 +103,8 @@ for server in servers:
url = '%s://%s:%s/%s?auto' % (proto, address, port, page)
# Try to fetch the status page for each server
try:
- fd = urllib2.urlopen(url)
+ request = urllib2.Request(url, headers={"Accept" :
"text/plain"})
+ fd = urllib2.urlopen(request)
except urllib2.URLError, e:
if 'SSL23_GET_SERVER_HELLO:unknown protocol' in str(e):
# HACK: workaround misconfigurations where port 443 is used for