X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=69789fcd4770da72ecdaf962e7f38b4c893b8c1b;hp=6a2ffe86aa0b5c44d62aaf124d43978e8754d4cb;hb=5e1badae1e595b378f039f4a6b09f6e44767a37a;hpb=c2ee9283024b2cb2b4205f35b79c6f6093e0dce8 diff --git a/src/http.c b/src/http.c index 6a2ffe86..69789fcd 100644 --- a/src/http.c +++ b/src/http.c @@ -1951,11 +1951,17 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy, #endif &host_lookup_failed)) { + int family = socket_family (pconn.socket, ENDPOINT_PEER); sock = pconn.socket; using_ssl = pconn.ssl; - logprintf (LOG_VERBOSE, _("Reusing existing connection to %s:%d.\n"), - quotearg_style (escape_quoting_style, pconn.host), - pconn.port); + if (family == AF_INET6) + logprintf (LOG_VERBOSE, _("Reusing existing connection to [%s]:%d.\n"), + quotearg_style (escape_quoting_style, pconn.host), + pconn.port); + else + logprintf (LOG_VERBOSE, _("Reusing existing connection to %s:%d.\n"), + quotearg_style (escape_quoting_style, pconn.host), + pconn.port); DEBUGP (("Reusing fd %d.\n", sock)); if (pconn.authorized) /* If the connection is already authorized, the "Basic"