Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Mar 2004 16:55:46 +0000
From:      Peter Risdon <peter@circlesquared.com>
To:        fbsd_user@a1poweruser.com
Cc:        "freebsd-questions@FreeBSD. ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: downloading text files from apache
Message-ID:  <40460E12.3020108@circlesquared.com>
In-Reply-To: <MIEPLLIBMLEEABPDBIEGEEOFFNAA.fbsd_user@a1poweruser.com>
References:  <MIEPLLIBMLEEABPDBIEGEEOFFNAA.fbsd_user@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
fbsd_user wrote:

>I got no info found for man mime.types
>  
>

No, my fingers were ahead of my brain... mime.types(5) is put there by 
cups and refers to its own mime.types file.

>Are you saying that if I delete the statement for .txt out of the
>/usr/local/etc/apache/mime.types file that apache will
>download .txt files?
>  
>
I'm not advocating that. I'm advocating that you understand what this 
will do and why before thinking of doing it, and that in the meantime 
you compress any text files you want to make available for download, so 
they download as .zip, .gz or whatever.

Apache's documentation says of the mime.types file:

This file sets the default list of mappings from filename extensions to 
content types; changing this file is not recommended.
(http://httpd.apache.org/docs/mod/mod_mime.html#typesconfig)

Note there is an entry for zip files in mime.types with an extension, 
and one for gzipped files without an extension. Both download as you 
want on your computer but will behave slightly differently on some other 
machines. The server and browser are interacting here. It's worth 
learning about it properly before editing a configuration file.

>Is there some statement I can add to httpd.conf to over ride
>the mime.types file?
>  
>
There's an AddType statement for adding new mime types. That won't help 
you here, though.

Bear in mind that when a browser displays a text file, it _has_ 
downloaded it. If the viewer wants to save it, they can. It's displayed 
to be helpful. Text files can be read and displayed by browsers. 
Changing this will change it everywhere, with everything the server 
does. Are you sure that's what you want?


PWR.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40460E12.3020108>