From: Graham Leggett Date: Tue, 19 Oct 2010 22:53:41 +0000 (+0000) Subject: Avoid unnecessariy initialisation before we test ldap-status handler name. X-Git-Tag: 2.3.9~262 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7cecbabda3fefb259c7fe4065c3446de8dec33a8;p=thirdparty%2Fapache%2Fhttpd.git Avoid unnecessariy initialisation before we test ldap-status handler name. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024453 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 95a88be3ed8..6f485b5a000 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -104,18 +104,20 @@ static void util_ldap_strdup (char **str, const char *newstr) */ static int util_ldap_handler(request_rec *r) { - util_ldap_state_t *st = (util_ldap_state_t *) - ap_get_module_config(r->server->module_config, - &ldap_module); + util_ldap_state_t *st; r->allowed |= (1 << M_GET); - if (r->method_number != M_GET) + if (r->method_number != M_GET) { return DECLINED; + } if (strcmp(r->handler, "ldap-status")) { return DECLINED; } + st = (util_ldap_state_t *) ap_get_module_config(r->server->module_config, + &ldap_module); + ap_set_content_type(r, "text/html; charset=ISO-8859-1"); if (r->header_only)