X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=11af939a170fc20d073795988b13ef717d0a1b5b;hp=e2cee5894db141ef34ce18ddd9985bee6a2331a1;hb=1b28d66fcb583791fb1f92199a29e1063cdd6ed8;hpb=5f341d6bc175e2cb046680587eaa281791b91ceb diff --git a/src/http.c b/src/http.c index e2cee589..11af939a 100644 --- a/src/http.c +++ b/src/http.c @@ -1622,19 +1622,18 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) only hurts us. */ request_remove_header (req, "Authorization"); } - } - - if (sock < 0) - { - /* In its current implementation, persistent_available_p will - look up conn->host in some cases. If that lookup failed, we - don't need to bother with connect_to_host. */ - if (host_lookup_failed) + else if (host_lookup_failed) { request_free (req); + logprintf(LOG_NOTQUIET, + _("%s: unable to resolve host address `%s'\n"), + exec_name, relevant->host); return HOSTERR; } + } + if (sock < 0) + { sock = connect_to_host (conn->host, conn->port); if (sock == E_HOST) {