httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo ...@perlig.de>
Subject [PATCH] mod_negotiation.c
Date Sat, 26 Oct 2002 00:44:28 GMT
[ Simply trying again; or according to Jeff: nag, nag, nag ;-) ]

If you use the "body" feature in type map files, the MIME-headers
currently are set dependant on what (mostly) type_checker says about the
type map file.

The attached patch sets the MIME-type, charset, content-language and
content-encoding of a negotiated type-map body. Thus you can hold
different types, languages etc. inside the same file, for example:

--------------8<---[ typemap.var ]-----------------------
Content-language: de
Content-type: text/html; charset=ISO-8859-1
Body:----------dehtml--
[german text/html document]
----------dehtml--

Content-language: de
Content-type: application/xhtml+xml; charset=UTF-8
Body:----------dexml--
[german application/xhtml+xml document; utf-8 encoded]
----------dexml--

Content-language: en
Content-type: text/plain; charset=us-ascii
Body:----------en--
[english text/plain document]
----------en--
--------------8<---[ typemap.var ]-----------------------

The information will only be set if available, of course.

nd
--
package Hacker::Perl::Another::Just;print
qq~@{[reverse split/::/ =>__PACKAGE__]}~;

#  André Malo  #  http://www.perlig.de  #

Mime
View raw message