summaryrefslogtreecommitdiff
path: root/lib/hostip.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-05-11 09:49:31 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-05-11 16:33:20 +0200
commitfa050ffd27524074660d0614d14e7dfd022c893b (patch)
treeafe4cd37639362bf13603e4a7da23fc22de90eb9 /lib/hostip.c
parent1a20689a56af29871a88c338ea0da3268038312c (diff)
downloadcurl-fa050ffd27524074660d0614d14e7dfd022c893b.tar.gz
hostip: remove the debug code for LocalHost
The Curl_resolv() had special code (when built in debug mode) for when resolving the host name "LocalHost" (using that exact casing). It would then get the host name from the --interface option instead. This development-only feature was not used by anything (anymore) and we have the --resolve feature if we want to play similar tricks properly going forward. Closes #7044
Diffstat (limited to 'lib/hostip.c')
-rw-r--r--lib/hostip.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 05c09f683..45190a100 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -466,10 +466,6 @@ Curl_cache_addr(struct Curl_easy *data,
* function is used. You MUST call Curl_resolv_unlock() later (when you're
* done using this struct) to decrease the counter again.
*
- * In debug mode, we specifically test for an interface name "LocalHost"
- * and resolve "localhost" instead as a means to permit test cases
- * to connect to a local test server with any host name.
- *
* Return codes:
*
* CURLRESOLV_ERROR (-1) = error, no pointer
@@ -578,13 +574,7 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
/* If Curl_getaddrinfo() returns NULL, 'respwait' might be set to a
non-zero value indicating that we need to wait for the response to
the resolve call */
- addr = Curl_getaddrinfo(data,
-#ifdef DEBUGBUILD
- (data->set.str[STRING_DEVICE]
- && !strcmp(data->set.str[STRING_DEVICE],
- "LocalHost"))?"localhost":
-#endif
- hostname, port, &respwait);
+ addr = Curl_getaddrinfo(data, hostname, port, &respwait);
}
}
if(!addr) {