From owner-freebsd-questions@FreeBSD.ORG Wed Mar 3 08:54:30 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B72C16A4CF for ; Wed, 3 Mar 2004 08:54:30 -0800 (PST) Received: from dyer.circlesquared.com (host217-45-219-83.in-addr.btopenworld.com [217.45.219.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id D271743D1D for ; Wed, 3 Mar 2004 08:54:29 -0800 (PST) (envelope-from peter@circlesquared.com) Received: from circlesquared.com (localhost.petanna.net [127.0.0.1]) i23Gtk1J054016; Wed, 3 Mar 2004 16:55:57 GMT (envelope-from peter@circlesquared.com) Message-ID: <40460E12.3020108@circlesquared.com> Date: Wed, 03 Mar 2004 16:55:46 +0000 From: Peter Risdon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20031102 X-Accept-Language: en-us, en MIME-Version: 1.0 To: fbsd_user@a1poweruser.com References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: "freebsd-questions@FreeBSD. ORG" Subject: Re: downloading text files from apache X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 16:54:30 -0000 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.