Re: squid (1.2) mangles ftp://foo/textfile into a download form

From: Dancer <>
Date: Mon, 16 Mar 1998 14:33:01 +1000

It's a side-effect.

If the browser does FTP itself, then it examines the name of the file,
and compares it with it's built-in file-extension/mime-type table. If it
comes across a type it doesn't know, it decides it's text/plain (which
sometimes causes faulty downloads).

ftpget, on the other hand, which is the part of squid that does ftp
presents a slightly different behaviour: It examines the name of the
file and matches it against lib/mime_table.h

If it doesn't find it there, it supplies a mime-type of
application/octet-stream (if I recall correctly). The default is
modifiable. That mime-type triggers the browser to do a download, and to
treat the file as a binary (the latter is the safest way to treat it).

However, having been given a mime-type, the browser will not attempt to
reinterpret it. Also, it is Not The Right Thing(tm) to omit the MIME
type (I'm fairly sure), because that will also cause the browser to act

Damn shame that browsers don't respond to mime types like:


George Michaelson wrote:
> Using navigator 3.x, a user is reporting that direct fetch off an ftp
> archive of *.README presents text into browser.
> The same browser, the same MIME config, when using the squidcache presents
> the download popup box and saves-to-disk instead.
> Is this a mis-application or installation of MIME related code/conf in squid?
> -George

Did you read the documentation AND the FAQ?
If not, I'll probably still answer your question, but my patience will
be limited, and you take the risk of sarcasm and ridicule.
Received on Sun Mar 15 1998 - 20:43:47 MST

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