SUMMARY: http and ftp

From: Mark Belanger (mjb@ltx.com)
Date: Tue Jul 30 1996 - 10:19:11 CDT


Thanks for the quick and helpful responses:

Original Question:

>I have a Solaris2.4 machine running httpd. I have set it up as
>an internal anonymous ftp server following the directions in
>man ftpd. (The purpose is to share files with Macs running netscape).
>
>When we access the ftp/pub directory with Netscape, it doesn't seem
>to recognize various extensions. For example, if you click on a file
>name foo.exe, the browser recognizes it as a binary file and downloads
>it. However if you click on a foo.xls (MS Excel file), the browser
>tries to display it. Once the gibberish is displayed, you can
>download a usable copy.
>
>How can we get to immediately begin the download without first
>trying to display these clearly non-text files?
>
>What mechanism is recognizing or not recognizing the file types?
>Is it the ftpd, the httpd, netscape configuration?
>

Here are ALL responses, the consensus seemed to be either
the .mime.types and/or the server conf files. There are a couple
of different solutions.

Niall O Broin - Gray Wizard <nobroin@esoc.esa.de>:

> What mechanism is recognizing or not recognizing the file types?
> Is it the ftpd, the httpd, netscape configuration?
    
    It's the server's mime.types file. In there you'll find a line like
    
    application/octet-stream exe bin
    
    The octet-stream means that the browser should just download the data rather
    than attempt to display it. The exe bin at the end are the extensions of
    files which should be treated in this manner. I don't know what your server
    has there at the moment - definitely at least exe because you said that
    .files download when clicked. All you need to do is add xls to this list and
    restart your server.

Alex Finkel <afinkel@pfn.com>:

    Press and hold the <SHIFT> key before you click on a link to a file you wish
    to download. Save-as will then be the default. Check your preferences.

Mark Belanger <mjb@westwood.ltx.com>:

    I got it! (Or at least one solution)
    
    I added this line to my .mime.types:
    type=application/octet-stream xls bin
    
    In General Preferences, specify the path to your .mime.types file.
    
    Voila! Clicking on the file immediately pops up the save as
    dialog box.

Raju Krishnamurthy <raju@pez.ecologic.net>:

    You want to add the following line to <server-root>/conf/srm.conf
    
    DefaultType application/octet-stream
    
    And then restart the server. This will cause a file with an unknown
    extension to be returned as an octet-stream causing the the browser
    (in most cases) to pop open the "Save as" window. But we warned, you have
    to make sure that you have mime types for all other things set
    correctly, or this will cause you more frustration. (Ex: make sure
    you have a mime type for ".txt" otherwise it will return is as an octet
    stream, which is probably *not* what you want to happen)

-- 
Mark Belanger                 Email : mjb@ltx.com     
LTX Corporation               Fax   : (617) 329-6880  
LTX Park at University Ave    Voice : (617) 467-5021   
Westwood Ma 02090             http://www.tiac.net/users/mjb



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:06 CDT