Subject: SIZE command of ftpd depends on binary or ascii mode
To: None <tech-userlevel@NetBSD.org>
From: Klaus Heinz <firstname.lastname@example.org>
Date: 12/22/2005 02:25:55
I just encountered a surprising behaviour of ftpd on ftp.NetBSD.org.
/pub/NetBSD/packages/pkgsrc/README-all.html is not accessible through my
local apache proxy server (1.3.34 from pkgsrc).
A closer look with ethereal revealed this:
550 README-all.html: file too large for SIZE
( It seems apache uses the SIZE command as a heuristic method to determine
whether a filename is a directory or not because the packet trace
550 README-all.html: Not a directory
On the other hand our /usr/bin/ftp had no problems at all to determine
the size of the file.
The significant difference is that apache does not set the type of data
(ascii or binary) explicitly before this SIZE command, while our
/usr/bin/ftp does set type "binary" (at least with an URL argument of
ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/ and a subsequent
Is this behaviour of ftpd intended (and correct)?
If it is tunable (I found nothing about this in the man pages) I think
this should be changed on ftp.NetBSD.org.