You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by André Malo <nd...@perlig.de> on 2002/10/05 21:24:11 UTC

[PATCH] mod_negotiation.c

Hi,

[sent a similiar patch several weeks ago, but wasn't noticed, so I try
it again.. :)]

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<---[ type.map ]-----------------------
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<---[ type.map ]-----------------------

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

Technical Note: I'm not sure, whether copying the information there is
the right way (instead of assigning pointers), but I guess, you tell me,
if it's wrong ;-)

Since the distributed customized error documents are going to rely on
this header information, any feedback would be appreciated.

nd
-- 
$_=q?tvc!uif)%*|#Bopuifs!A`#~tvc!Xibu)%*|qsjou#Kvtu!A`#~tvc!KBQI!)*|~
tvc!ifmm)%*|#Qfsm!A`#~tvc!jt)%*|(Ibdlfs(~  # What the hell is JAPH? ;
@_=split/\s\s+#/;$_=(join''=>map{chr(ord(  #             André Malo ;
$_)-1)}split//=>$_[0]).$_[1];s s.*s$_see;  #  http://www.perlig.de/ ;