diff options
Diffstat (limited to 'libs/libcurl/src/openldap.c')
| -rw-r--r-- | libs/libcurl/src/openldap.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/libcurl/src/openldap.c b/libs/libcurl/src/openldap.c index 2a21094b7d..5263d17aec 100644 --- a/libs/libcurl/src/openldap.c +++ b/libs/libcurl/src/openldap.c @@ -117,7 +117,7 @@ static Curl_recv oldap_recv; */
const struct Curl_handler Curl_handler_ldap = {
- "LDAP", /* scheme */
+ "ldap", /* scheme */
oldap_setup_connection, /* setup_connection */
oldap_do, /* do_it */
oldap_done, /* done */
@@ -131,6 +131,7 @@ const struct Curl_handler Curl_handler_ldap = { ZERO_NULL, /* perform_getsock */
oldap_disconnect, /* disconnect */
ZERO_NULL, /* write_resp */
+ ZERO_NULL, /* write_resp_hd */
ZERO_NULL, /* connection_check */
ZERO_NULL, /* attach connection */
PORT_LDAP, /* defport */
@@ -145,7 +146,7 @@ const struct Curl_handler Curl_handler_ldap = { */
const struct Curl_handler Curl_handler_ldaps = {
- "LDAPS", /* scheme */
+ "ldaps", /* scheme */
oldap_setup_connection, /* setup_connection */
oldap_do, /* do_it */
oldap_done, /* done */
@@ -159,6 +160,7 @@ const struct Curl_handler Curl_handler_ldaps = { ZERO_NULL, /* perform_getsock */
oldap_disconnect, /* disconnect */
ZERO_NULL, /* write_resp */
+ ZERO_NULL, /* write_resp_hd */
ZERO_NULL, /* connection_check */
ZERO_NULL, /* attach connection */
PORT_LDAPS, /* defport */
@@ -548,9 +550,12 @@ static CURLcode oldap_connect(struct Curl_easy *data, bool *done) return result;
}
- hosturl = aprintf("ldap%s://%s:%d",
- conn->handler->flags & PROTOPT_SSL? "s": "",
- conn->host.name, conn->remote_port);
+ hosturl = aprintf("%s://%s%s%s:%d",
+ conn->handler->scheme,
+ conn->bits.ipv6_ip? "[": "",
+ conn->host.name,
+ conn->bits.ipv6_ip? "]": "",
+ conn->remote_port);
if(!hosturl)
return CURLE_OUT_OF_MEMORY;
|
