]> sjero.net Git - wget/commitdiff
Fix silly scoping bug.
authorMicah Cowan <micah@cowan.name>
Wed, 3 Oct 2007 06:15:08 +0000 (23:15 -0700)
committerMicah Cowan <micah@cowan.name>
Wed, 3 Oct 2007 06:15:08 +0000 (23:15 -0700)
src/http.c

index 853132dc396d9fa52458dc30c49e5d02ef975628..11af939a170fc20d073795988b13ef717d0a1b5b 100644 (file)
@@ -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");
         }
                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,
         {
           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;
         }
                     exec_name, relevant->host);
           return HOSTERR;
         }
+    }
 
 
+  if (sock < 0)
+    {
       sock = connect_to_host (conn->host, conn->port);
       if (sock == E_HOST)
         {
       sock = connect_to_host (conn->host, conn->port);
       if (sock == E_HOST)
         {