]> sjero.net Git - wget/blobdiff - src/http.c
Add support for --content-on-error.
[wget] / src / http.c
index fc88118fa773acff6ce05d459f6eecb8b77aa6dc..7eef453f6ccca5cedb0bb6f59d7f9b81e75c4a97 100644 (file)
@@ -1626,7 +1626,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
       /* ... but some HTTP/1.0 caches doesn't implement Cache-Control.  */
       request_set_header (req, "Pragma", "no-cache", rel_none);
     }
-  if (hs->restval && !opt.timestamping)
+  if (hs->restval)
     request_set_header (req, "Range",
                         aprintf ("bytes=%s-",
                                  number_to_static_string (hs->restval)),
@@ -2451,7 +2451,7 @@ read_header:
   type = NULL;                        /* We don't need it any more.  */
 
   /* Return if we have no intention of further downloading.  */
-  if (!(*dt & RETROKF) || head_only)
+  if ((!(*dt & RETROKF) && !opt.content_on_error) || head_only)
     {
       /* In case the caller cares to look...  */
       hs->len = 0;