From: Bradley Nicholes Date: Mon, 25 Oct 2004 18:32:58 +0000 (+0000) Subject: Since the host will include a port if the default port is not used, always specify... X-Git-Tag: 2.1.1~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18a1a014e6306a29e2097b53884c445250560905;p=thirdparty%2Fapache%2Fhttpd.git Since the host will include a port if the default port is not used, always specify the default ports for the port parameter. This will allow a host string that contains multiple hosts the ability to mix some hosts with ports and some without. All hosts which do not specify a port will use the default port. #30592 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105596 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 6beff651ec1..f724cc426b5 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -259,7 +259,12 @@ LDAP_DECLARE(int) util_ldap_connection_open(request_rec *r, { apr_ldap_err_t *result = NULL; - apr_ldap_init(r->pool, &(ldc->ldap), ldc->host, ldc->port, + /* Since the host will include a port if the default port is not used, + always specify the default ports for the port parameter. This will allow + a host string that contains multiple hosts the ability to mix some + hosts with ports and some without. All hosts which do not specify + a port will use the default port.*/ + apr_ldap_init(r->pool, &(ldc->ldap), ldc->host, ldc->secure?LDAPS_PORT:LDAP_PORT, ldc->secure, &(result)); if (result != NULL) {