Description: Handle ap_get_server_version split in Apache 2.4
Author: Colin Watson <cjwatson@debian.org>
Forwarded: no
Last-Update: 2013-07-08

Index: b/mod_defensible.c
===================================================================
--- a/mod_defensible.c
+++ b/mod_defensible.c
@@ -70,6 +70,13 @@
 
 module AP_MODULE_DECLARE_DATA defensible_module;
 
+#if AP_SERVER_MAJORVERSION_NUMBER > 2 || \
+    (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER >= 4)
+#define GET_SERVER_BANNER ap_get_server_banner
+#else
+#define GET_SERVER_BANNER ap_get_server_version
+#endif
+
 /* Callback function called when we get DnsblUse option */
 static const char *use_dnsbl(cmd_parms *parms __attribute__ ((unused)),
                              void *mconfig,
@@ -191,7 +198,7 @@
     ap_rprintf(r, "<p>You don't have permission to access %s\n", ap_escape_html(r->pool, r->uri));
     ap_rprintf(r, "on this server because you are currently blacklisted by a DNSBL server at: <b>%s</b></p>\n", dnsbl);
     ap_rputs("<hr>\n", r);
-    ap_rprintf(r, "<address>%s</address>\n", ap_get_server_version());
+    ap_rprintf(r, "<address>%s</address>\n", GET_SERVER_BANNER());
     ap_rputs("</body></html>\n", r);
 }
 
