Date: Tue, 4 Mar 1997 09:23:13 -0700 (MST) From: Marc Slemko <marcs@znep.com> To: Garrett Wollman <wollman@lcs.mit.edu> Cc: bugs@freebsd.org Subject: Re: bin/2870: fetch won't restart http transfers Message-ID: <Pine.BSF.3.95.970304092006.20884B-100000@alive.znep.com> In-Reply-To: <9703041506.AA26430@halloran-eldar.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Mar 1997, Garrett Wollman wrote: > <<On Tue, 4 Mar 1997 00:07:47 -0700 (MST), marcs@znep.com said: > > > if (to_stdout) > > local = fopen("/dev/stdout", "w"); > > else > > ! local = fopen(fs->fs_outputfile, "a"); > > if (local == 0) { > > warn("%s: fopen", fs->fs_outputfile); > > fclose(remote); > > This is incorrect. The correct code would be: > > if (to_stdout) > local = fopen("/dev/stdout", restarting ? "a" : "w"); > else > local = fopen(fs->fs_outputfile, restarting ? "a" : "w"); I actually thought about it, but: 1. how are we going to append to stdout and what meaning does that have? 2. what does it matter if we open it for appending, since a file opened for appending need not exist and we seek to the start before writing anyway. I won't disagree with only opening for appending if you are restarting, but don't see the necessity... > > The comment immediately above should probably be fixed as well. > > > > ! if (strncasecmp(orig, "bytes", 5) != 0) { > > warnx("unknown Content-Range unit: `%s'", orig); > > return EX_PROTOCOL; > > } > > This patch is correct. I don't know how I missed this. > > -GAWollman >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970304092006.20884B-100000>