]> sjero.net Git - wget/blobdiff - src/http.c
[svn] Committed my patches from <sxsbsw16sbu.fsf@florida.arsdigita.de>
[wget] / src / http.c
index 59cfc04475014f451c1c17fc4af420d96deabc2d..24de9bb8f9d58a8d03329503ca00d54f97298fa7 100644 (file)
@@ -843,8 +843,17 @@ Accept: %s\r\n\
          return FOPENERR;
        }
     }
-  else                      /* opt.dfp */
-    fp = opt.dfp;
+  else                         /* opt.dfp */
+    {
+      fp = opt.dfp;
+      if (!hs->restval)
+       {
+         /* This will silently fail for streams that don't correspond
+            to regular files, but that's OK.  */
+         rewind (fp);
+         clearerr (fp);
+       }
+    }
 
   /* #### This confuses the code that checks for file size.  There
      should be some overhead information.  */