[comp.unix.questions] FTP 512 or 1024 byte blocks?

kdq@demott.COM (Kevin D. Quitt) (10/26/90)

    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?

-- 
 _
Kevin D. Quitt         demott!kdq   kdq@demott.com
DeMott Electronics Co. 14707 Keswick St.   Van Nuys, CA 91405-1266
VOICE (818) 988-4975   FAX (818) 997-1190  MODEM (818) 997-4496 PEP last

                96.37% of all statistics are made up.

mcgough@wrdis03.af.mil (Jeffrey B. McGough) (10/27/90)

In article <847@demott.COM> kdq@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?
>

Mine says hash character @ every 2048 bytes (pyramid 4.4 OSX)
never checked what it was really...
Maybe I'm to trusting.... [:^)

-- 
Lator,                           Don't ask me what I think of you...
                                 Cuz I might not tell you what you want me to.
Jeffrey B. McGough
WR-ALC UNIX Systems Administrator             (mcgough@logdis3.wr.aflc.af.mil)

rsalz@bbn.com (Rich Salz) (10/31/90)

In <847@demott.COM> kdq@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@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.