Re: FTP type proposed solution..

From: Trevor Paquette <tpaquett@dont-contact.us>
Date: Tue, 25 Feb 1997 16:34:20 -0700

How can it fail? Think about this for a bit..

If the file has any bytes with the high bit set, or contains NULL, then it MUST
be a binary file of some sort. We will treat it as such, and send the file
via the application/octet mime type.

If it does not contain ANY of those characters, then the translation (if any)
will not affect the file contents in anyway. It can't.

Try it out for yourself.. it just works.

On Feb 25, 22:39, Henrik Nordstrom wrote:
> Subject: Re: FTP type proposed solution..
> The problem is still there. If the detection fails on a file, then some
> users WILL NOT BE ABLE to download the file whatever they do, since
> text/plain is just text/plain and as such triggers automatic translation
> of newlines and other nice things that are very bad when applied to
> binary files.
>
> ---
> Henrik Nordström
>
> Trevor Paquette wrote:
> > Simple, yet will solve 95% of all the files out there. I have used this
before
> > in trying to determine if a file is binary or not, and I have only had it
fail
> > twice. I set 'X' to the first 256 bytes of the file.
> >
> > Can do?
>-- End of excerpt from Henrik Nordstrom

--
Trevor Paquette              |MetroNet Solutions Inc. |Work:(403)543-2355
TrevorPaquette@mcc.net       |  2700, 421 7th Ave SW  | Fax:(403)543-2854
http://www.nsci.net          |  Calgary, Ab, Canada   |ICBM:51'05"N/114'01"W
Senior Unix Network Architect|        T2P 4K9         |Mind:In the Rockies
Received on Tue Feb 25 1997 - 15:48:33 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:32 MST