Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 81480 invoked from network); 19 Oct 2010 22:54:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 22:54:39 -0000 Received: (qmail 11089 invoked by uid 500); 19 Oct 2010 22:54:39 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 11030 invoked by uid 500); 19 Oct 2010 22:54:39 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 11023 invoked by uid 99); 19 Oct 2010 22:54:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 22:54:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 22:54:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 414A82388999; Tue, 19 Oct 2010 22:53:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1024453 - /httpd/httpd/trunk/modules/ldap/util_ldap.c Date: Tue, 19 Oct 2010 22:53:42 -0000 To: cvs@httpd.apache.org From: minfrin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101019225342.414A82388999@eris.apache.org> Author: minfrin Date: Tue Oct 19 22:53:41 2010 New Revision: 1024453 URL: http://svn.apache.org/viewvc?rev=1024453&view=rev Log: Avoid unnecessariy initialisation before we test ldap-status handler name. Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=1024453&r1=1024452&r2=1024453&view=diff ============================================================================== --- httpd/httpd/trunk/modules/ldap/util_ldap.c (original) +++ httpd/httpd/trunk/modules/ldap/util_ldap.c Tue Oct 19 22:53:41 2010 @@ -104,18 +104,20 @@ static void util_ldap_strdup (char **str */ 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)