]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hostip: remove the debug code for LocalHost
authorDaniel Stenberg <daniel@haxx.se>
Tue, 11 May 2021 07:49:31 +0000 (09:49 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 11 May 2021 14:33:20 +0000 (16:33 +0200)
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

lib/hostip.c

index 05c09f6835fc8435442d3af8646d5eec5985016c..45190a100b9f8163699e266147c42ca9bfec5846 100644 (file)
@@ -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) {