httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: [PATCH] mod_autoindex & character set
Date Thu, 01 Feb 2007 21:01:52 GMT


On 02/01/2007 06:13 PM, William A. Rowe, Jr. wrote:
> Dr. Peter Poeml wrote:
> 
>>On Thu, Feb 01, 2007 at 10:59:46 +0000, Joe Orton wrote:
>>
>>>On Wed, Jan 31, 2007 at 09:45:12PM +0100, Dr. Peter Poeml wrote:
>>>
>>>>Users have a problem with directory listings generated by mod_autoindex:
>>>>It is not possible to control the character setting which which the
>>>>response is marked.
>>>
>>>AddDefaultCharset does allow this already as you mention in the bug.  
>>>Can't users who insist on using filenames using one encoding and file 
>>>content using another simply use:
>>>
>>>AddDefaultCharset UTF-8
>>>AddCharset ISO-8859-1 .html
>>>
>>>or similar?
>>
>>I don't think so, because it means 
>> 1) that all .html files would need to be ISO-8859-1
>> 2) you cannot have files with charset=somethingelse anymore
>> 3) all non-html files would need to be UTF-8 then, unless you add
>>    AddCharset directives for all of them...
> 
> 
> And you can't match by name.  I'm reviewing the patch, but I'll already
> offer a +1 on the concept.

In the general case I agree with Joe that if things can be done with existing
directives / code, no new directives / code should be added, but this case here
is different.

I think it is the ultimate duty of the content generator to set the correct
content type / encoding. So in this case this would be mod_autoindex. Whether
mod_autoindex detects this automatically or has a directive to set this is another
story. Currently I would be in favour of a directive provided that there is
no reliable and performant autodetection mechanism.

>From my point of view AddDefaultCharset and AddCharset should be used to

- configure the "core content generator" of httpd (serving static files)
- help fixing broken content generators who cannot set the encoding correctly
  by themselves

So +1 on the general concept.

Regards

RĂ¼diger

Mime
View raw message