httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] serving files
Date Sat, 18 Jan 2003 18:07:09 GMT
On Sat, 18 Jan 2003, Nelson Goforth wrote:

> You are probably going to have to put the midi files in an envelope - a
> compressed format such as Zip or Stuffit for instance.  Another format
> such as hqx or gz or tar would work, but the average Joe might not be
> able to handle those formats.
> The problem is that the user configures their browser to handle certain
> file extensions in certain ways - if you call it "*.midi" it will play
> (assuming that the browser is set to do that, and most are) - if you
> call it "*.txt" it will print random-like garbage in their browser.
> Most browsers will be configured to download a ".sit" or ".zip" file to
> their drives.  Then the files have to be extracted and that takes
> another step, but I don't know of a better method.  Why not place all
> or several midi files in one Stuffit or Zip archive - they are very
> small anyway.

What you say is largely accurate, but quite a bit simplified.  Primarily,
you omit the whole notion of Content-Type (mime-type), which is how the
web server communicates to the browser what the file is.  Properly
functioning web browsers will ignore the filename extension and use the
content-type to decide how to handle the file.  Then changing the content
type (through the Apache AddType directive or the mime.types file) is one
way to get the browser to change what it does.

There are two problems with this:

1. It is never a good idea to lie to the browser about the content-type,
and besides, there is no way to guarentee that a specific content-type
will be handled in a specific way.

2. MSIE ignores the HTTP standard in certain circumstances and uses the
filename extension rather than the content-type.  See:


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message