On Wed, May 02, 2001 at 08:55:19PM -0500, Brandon wrote: > > > The correct behavior would be to send the compressed data along to the > > browser without touching it, while setting the Transfer-Encoding HTTP > > header to gzip. If the browser is incapable of handling that > > Transfer-Encoding then you can unzip it yourself and send it along. > > That's the right way if you're writing a browser-centric metadata system. > However, the web is only one of the possible interfaces. What you're > proposing would break all existing clients whenever this feature is used > just so that things would be the most natural for the one client that also > integrates with a web browser. I see no value in doing it the way which is > most natural for integrating with a web browser.
No, I'm saying that FProxy should do the right thing w/r/to a web browser. Other clients may or may not need to perform automatic decompression at layer X. How can adding a feature to FProxy break all existing clients? > > But how are you supposed to reliably determine the Content-Type to > > send to the browser if we're sticking application/x-gzip in our > > ContentType Info field? Filename guessing is not sufficient.. > > Obviously if the clients are by convention automatically zipping/unzipping > files then they will by convention store the MIME type of the zipped file > in the generated zip file. So when the autozip-aware client sees a zip > file it unzips it (if autounzip is turned on). If the file contains a file > called CONTENT-TYPE then it reads the content type from it, sets the > ContentType field in the metadata, and sends the contained file along as > the data. If no such file exists, then it can either 1) use filename > guessing if configured to do so, or 2) give up since this is just a normal > zip file and not an autozipped file. Of course if filename guessing is > turned on it will work with normal zip files as well. However, if there is > no content type and file name guessing is off then the only reasonable > thing to do is to give up and pass the zip on as a zip. Don't conflate compression with archiving. > This scheme will actually work with clients which are totally naive to > autozipping. You can put the CONTENT-TYPE filed in a zip file yourself or > turn on filename guessing. Or you can just download straight zip files and > unzip them yourself. You're right. That is so much simpler and transparent than, say, adding a ContentEncoding field to the Info metadata. > > Let's do this the right way. > > Definitely. La la la. -- # tavin cole # # "The process of scientific discovery is, in effect, # a continual flight from wonder." # - Albert Einstein _______________________________________________ Devl mailing list Devl at freenetproject.org http://lists.freenetproject.org/mailman/listinfo/devl
