diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-01-09 22:38:22 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-01-10 09:37:47 +0100 |
commit | 7edb0fcf3f92f4b58620142f41a830f1d465c833 (patch) | |
tree | 4c4166066fdb6620fb12f53bdd046764178f3659 /lib | |
parent | 2a19ad473a9d92cef1afeb2ee3d828017ca1a13d (diff) | |
download | curl-7edb0fcf3f92f4b58620142f41a830f1d465c833.tar.gz |
ldap: return CURLE_URL_MALFORMAT for bad URL
For consistency, use the same return code for URL malformats,
independently of what scheme that is used. Previously this would return
CURLE_LDAP_INVALID_URL, but starting now that error cannot be returned.
Closes #8170
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldap.c | 6 | ||||
-rw-r--r-- | lib/strerror.c | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/ldap.c b/lib/ldap.c index 3154db5cf..3e3562078 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -306,8 +306,8 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) rc = _ldap_url_parse(data, conn, &ludp); #endif if(rc) { - failf(data, "LDAP local: %s", ldap_err2string(rc)); - result = CURLE_LDAP_INVALID_URL; + failf(data, "Bad LDAP URL: %s", ldap_err2string(rc)); + result = CURLE_URL_MALFORMAT; goto quit; } diff --git a/lib/strerror.c b/lib/strerror.c index 07d73a74b..ae650aef3 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2004 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2004 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -224,9 +224,6 @@ curl_easy_strerror(CURLcode error) case CURLE_BAD_CONTENT_ENCODING: return "Unrecognized or bad HTTP Content or Transfer-Encoding"; - case CURLE_LDAP_INVALID_URL: - return "Invalid LDAP URL"; - case CURLE_FILESIZE_EXCEEDED: return "Maximum file size exceeded"; @@ -337,6 +334,7 @@ curl_easy_strerror(CURLcode error) case CURLE_OBSOLETE50: case CURLE_OBSOLETE51: case CURLE_OBSOLETE57: + case CURLE_OBSOLETE62: case CURL_LAST: break; } |