]> sjero.net Git - wget/blobdiff - src/http.c
Fix timeout option when used with SSL
[wget] / src / http.c
index d63c0e2317dd3f421f6cbff8edb3209b9389a98f..a693355123f8b59ce7e20575954f326ce4896429 100644 (file)
@@ -1983,6 +1983,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
                     exec_name, quote (relevant->host));
           return HOSTERR;
         }
+      else if (sock != -1)
+        {
+          sock = -1;
+        }
     }
 
   if (sock < 0)
@@ -2778,8 +2782,7 @@ read_header:
     }
 
   /* Return if we have no intention of further downloading.  */
-  if ((!(*dt & RETROKF) && !opt.content_on_error) || head_only
-      || (opt.method && strcasecmp (opt.method, "get") != 0))
+  if ((!(*dt & RETROKF) && !opt.content_on_error) || head_only)
     {
       /* In case the caller cares to look...  */
       hs->len = 0;