Re: FTP type proposed solution..

From: Don Lewis <[email protected]>
Date: Wed, 26 Feb 1997 04:41:08 -0800

On Feb 26, 11:13pm, David J N Begley wrote:
} Subject: Re: FTP type proposed solution..
} On Wed, 26 Feb 1997, Don Lewis wrote:
}
} > IMHO, if we can't figure out the type of the file based on it's
} > extension (if any), then we should present two links for the file in a
} > directory listing, one with ";type=a", and one with ";type=i". If the
}
} If we're going to do any form of "type matching", say on RE's as was
} suggested, would there still be a need to duplicate entries in directories
} (which, sadly, does confuse some users.. *sigh*)?

You always have to worry about what to do if the built-in smarts makes
the wrong guess. If you don't have any way to force squid to do the
right thing, then you're SOL. Even if the "guessing" is configurable,
do you want to have to contact the operators of all your neighbor and
parent caches to have them tweak their configurations so that you can
fetch that critically important file uncorrupted?

} If it's to happen, I hope it's a compile-time option so people who want it
} can have it, and others can chose the other method... :-)
}
} > The current implementation does ASCII mode ftp transfers if and only if
} > the mime_encoding is "7bit". I think some of the 8 bit types (latex,
} > shar, and tex) should also be transferred in ASCII mode to get the
} > expected line termination.
}
} For whom? If I'm on a Macintosh (urgh) my line termination is CR; using
} Squid on UNIX where line termination is LF, how does either Squid or the
} FTP server know that my line termination is CR? Once cached, what about
} the next user to come along (using Windows, of course .. ick) where line
} termination is CR *plus* LF?? :-)

The nice nice thing about ASCII mode transfers is that the over the
wire format is standardized. In that transfer mode, line terminations
are always CR/LF pairs. So if you want to fetch a text file from a Unix
server and save it on your Mac, the Unix box will turn LFs in the file
into CR/LF pairs for transmission across the net to the Squid cache.
The Squid cache will save the file in wire format (because no native
applications peek directly at it's cache) and transmit it to your Mac.
Your Mac will see the text/plain tag and change all the CR/LF pairs into
CRs. A Windoze machine at either end gets off easy and doesn't have to
do any translation because the wire format just happens to be the same
as its native format.

This is a lot like plain old FTP clients and servers. Each end knows
what it's native file format is and does the appropriate translations
when sending and receiving an file in ASCII mode.

} Isn't this a perfect example of why this stuff should be downloaded in
} *binary* mode, and leave the translation (if any) to the presentation
} layer (in the client) where it should be?

The problem with this is that the client doesn't know what the native
line termination sequence is on the server. If you use ASCII mode for
the transfer, the client doesn't need to know anything about the server,
it just needs to know how to translate between the wire format and it's
native format. And what do you do if the native character set on the
server is ECBDIC?

                        --- Truck
Received on Wed Feb 26 1997 - 04:47:40 MST

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