aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authorJohn-Mark Gurney <jmg@FreeBSD.org>1999-05-18 19:37:37 +0000
committerJohn-Mark Gurney <jmg@FreeBSD.org>1999-05-18 19:37:37 +0000
commit85020e14f0469749e32850247f6bee8893e4d94c (patch)
treed54917cc8292a129764f807b4d76255694c09786 /usr.bin/fetch
parentc558c5795ac062bfe919aff4c5b64900dfb78c31 (diff)
Notes
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/http.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c
index 815cc7d9fe19..7851b387d3ea 100644
--- a/usr.bin/fetch/http.c
+++ b/usr.bin/fetch/http.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: http.c,v 1.25 1999/02/03 20:24:53 fenner Exp $
+ * $Id: http.c,v 1.26 1999/02/23 18:51:13 wollman Exp $
*/
#include <sys/types.h>
@@ -1006,7 +1006,7 @@ spewerror:
if (to_stdout)
local = fopen("/dev/stdout", restarting ? "a" : "w");
else
- local = fopen(fs->fs_outputfile, restarting ? "a" : "w");
+ local = fopen(fs->fs_outputfile, restarting ? "a+" : "w+");
if (local == 0) {
warn("%s: fopen", fs->fs_outputfile);
fclose(remote);
@@ -1048,7 +1048,11 @@ spewerror:
*/
fseek(local, restart_from, SEEK_SET);
fs->fs_status = "computing MD5 message digest";
- status = check_md5(local, base64ofmd5);
+ if (!to_stdout)
+ status = check_md5(local, base64ofmd5);
+ else
+ warnx("can't check md5 digest on stdout: %s",
+ base64ofmd5);
free(base64ofmd5);
}