[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#440058: Suggest removing DefaultType from apache2.conf



Package: apache2
Version: 2.2.4-3
Severity: normal


apache2.conf currently contains this:

# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#     
DefaultType text/plain


I suggest commenting-out this default and adding the following explanation
after the current paragraph:

# Alternatively, Apache can send no content-type header at all when it
# cannot determine the type.  In this case, the browser will
# normally determine the type by inspection of the data, and/or apply
# its own default.  Standards-compliant browsers will not attempt this
# detection if Apache sends a content-type header, even if that header
# is wrong.
# Note that if a default type is set here, there is no way to remove
# the default and send no content-type header for unknown content for
# individual virtual hosts or directories.


For background, see:
http://www.w3.org/2001/tag/doc/mime-respect
section 4.2: Good Practice point 4:
 "Server software designers (implementers) SHOULD NOT specify default
  representation metadata, such as media type, character encoding, or
  content language, within the standard configuration shipped with the server."

The issue has recently been discussed on the apache-dev list and it is
likely that the DefaultType will be removed from their example configuration.
I think that they will also add a "DefaultType None" feature, solving the
problem described in the second paragraph of my additional comment block
above.

Appologies if this has already been considered; I was surprised to not
find an existing bug report.  I did search, honest!

Regards, Phil.



-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.21-1-686
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages apache2 depends on:
ii  apache2-mpm-worker            2.2.4-3    High speed threaded model for Apac

apache2 recommends no packages.

-- no debconf information



Reply to: