gabriel rosenkoetter on Fri, 21 Mar 2003 19:23:19 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Update: php prob: downloads empty file


On Fri, Mar 21, 2003 at 06:11:35PM -0500, Samantha S. Ollinger wrote:
> I renamed the file to no avail. I also noticed this:
> On the original file ls -al reveals:
> -rw-r-x---   1 sam    music 136179229 Aug 16  2002 so.tar.gz
> 
> on the downloaded file:
> -rw-------   1 sollinge staff 136179296 Mar 21 17:28 so.tar.gz

The first is on a machine with one byte line-endings, the second
thinks it's on a machine with two. That is, the web browser is
adding a CR or LF (as appropriate) that wasn't there in the original
file (and doesn't belong there at all, because it just so happens
that a byte *looks* like one or the other without actually being
such).

Run wc -l on the file (on either system!) and you should see that
wc(1) thinks it has 67 lines.

If so, I really do think that the web server's mime types are to
blame.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpLjZSNsINYS.pgp
Description: PGP signature