FTP 512 or 1024 byte blocks?

Rich Salz rsalz at bbn.com
Wed Oct 31 05:38:42 AEST 1990


In <847 at demott.COM> kdq at demott.COM (Kevin D. Quitt) writes:
.    Why is it that every manual I've seen about ftp, says that the hash
.option will cause the printing of a hash character every 1024 bytes
.received, yet every implementation of ftp I've used prints the hash
.every 512 bytes?
Because the code that implements the hash-mark printing is usually done
in a real sloppy manner:
	while ((i = read(socket, buffer, 1024)) > 0) {
	    if (hash_on)
		putchar('#');
	    write(newfile, buffer, i);
	}

This is fixed in the FTP available on uunet.uu.net in the directory ~/networking.
(That version has since had other fixes, like per-host macros, etc; email to me
if you can beta-test.)
	/r$
-- 
Please send comp.sources.unix-related mail to rsalz at uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.



More information about the Comp.unix.questions mailing list