You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@mch.sni.de> on 1998/01/08 15:59:18 UTC

Re: Mime type translation problem

On Tue, Dec 30, 1997 at 08:51:45PM -0600, Randy Terbush wrote:
> Hi,
> I have Apache 2.4 as a proxy server. All works fine. I can log in to any
> FTP site, but if I try to download any binary file, it interprets it as
> text/plain type and displays on screen. Is there anyway I can specify in
> the configuration files(I did set the DefaultType in srm.conf to
> application/octet-stream, but in vain) so that by default files are
> treated binary and the browser would ask me whether to save or execute?

The proxy ftp module currently ignores the DefaultType setting. If the
name of the requested file matches a MIME type, then this MIME type
is used (e.g., when transferring a tar file, the MIME type resolution
results in "Content-Type: application/x-tar"). However, when requesting
a gzipped file, like README.gz, no MIME type is detected, because the gzip
encoding would result in a "Content-Encoding: x-gzip" with the content
type still being "Content-Type: text/plain".

This is clearly a bug in the proxy ftp handling.

 a) the ftp proxy module ought to honor DefaultType (at least there should
    be a way to define
    <Location proxy:ftp:*>
      DefaultType mumble/grin
    </Location>

 b) the ftp proxy module ought to detect a Content-Encoding and add an
    appropriate HTTP header.

I looked at the code, but unfortunately there seems to be no "quick fix" to
make it work. Sorry, more has to be done to make it work right.

    Martin
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request