]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Since the host will include a port if the default port is not used, always specify...
authorBradley Nicholes <bnicholes@apache.org>
Mon, 25 Oct 2004 18:32:58 +0000 (18:32 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Mon, 25 Oct 2004 18:32:58 +0000 (18:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105596 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c

index 6beff651ec1a1a980bb22a3de65bd8135204df4a..f724cc426b50d7162eb404b30107ff3d8b04fd2f 100644 (file)
@@ -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) {