Mailing List Archive

AddType incompatibility
The very first entry in the Compatibility notes describes how the AddType
command is incompatbile with the NCSA behaviour; NCSA allows
AddType foo/bar foo bar
which Apache forbids.

This is daft; there is absolutely no reason for Apache to behave this
way. A patch follows; I suggest that it should be included in 1.0.

David.

29_addtype.0.8.15.patch
-----------------------

---begin file
From: drtr@ast.cam.ac.uk (David Robinson)
Subject: AddType and friends should allow multiple extensions
Affects: mod_mime.c
ChangeLog: Change AddType, AddEncoding and AddLanguage so that they take
multiple file extensions on a single command.

*** mod_mime.c.orig Tue Oct 10 23:00:33 1995
--- mod_mime.c Wed Oct 18 14:33:48 1995
***************
*** 134,145 ****
}

command_rec mime_cmds[] = {
! { "AddType", add_type, NULL, OR_FILEINFO, TAKE2,
! "a mime type followed by a file extension" },
! { "AddEncoding", add_encoding, NULL, OR_FILEINFO, TAKE2,
! "an encoding (e.g., gzip), followed by a file extension" },
! { "AddLanguage", add_language, NULL, OR_FILEINFO, TAKE2,
! "a language (e.g., fr), followed by a file extension" },
{ "TypesConfig", set_types_config, NULL, RSRC_CONF, TAKE1,
"the MIME types config file" },
{ NULL }
--- 134,145 ----
}

command_rec mime_cmds[] = {
! { "AddType", add_type, NULL, OR_FILEINFO, ITERATE2,
! "a mime type followed by one or more file extensions" },
! { "AddEncoding", add_encoding, NULL, OR_FILEINFO, ITERATE2,
! "an encoding (e.g., gzip), followed by one or more file extensions" },
! { "AddLanguage", add_language, NULL, OR_FILEINFO, ITERATE2,
! "a language (e.g., fr), followed by one or more file extensions" },
{ "TypesConfig", set_types_config, NULL, RSRC_CONF, TAKE1,
"the MIME types config file" },
{ NULL }
---end file