From 1b28d66fcb583791fb1f92199a29e1063cdd6ed8 Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Tue, 2 Oct 2007 23:15:08 -0700 Subject: [PATCH] Fix silly scoping bug. --- src/http.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/http.c b/src/http.c index 853132dc..11af939a 100644 --- a/src/http.c +++ b/src/http.c @@ -1622,14 +1622,7 @@ 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, @@ -1637,7 +1630,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) exec_name, relevant->host); return HOSTERR; } + } + if (sock < 0) + { sock = connect_to_host (conn->host, conn->port); if (sock == E_HOST) { -- 2.39.2