[Zope-CMF] Re: Fwd: [CMF] 281/ 1 Request "FSFile content_type weakness"

Tres Seaver tseaver at zope.com
Sun Sep 5 14:40:29 EDT 2004


Jens Vagelpohl wrote:
>> Uploaded:  "FSFile.pat"
>>  - http://zope.org/Collectors/CMF/281/FSFile.pat/view
>> The way the content_type is detected in CMFCore.FSFile prevents 
>> content_type to be explicitly specified inside a .metadata file for 
>> the resource since any content_type value coming from the .metadata 
>> file is disregarded. This small patch will, as a last resort, use a 
>> content_type specification from the .metadata file *if* it is obvious 
>> that the normal content_type detection has failed, meaning it returned 
>> "application/octet-stream".
>>
>> Specific use case for this change: I am trying to store a favicon.ico 
>> file on the file system. Without the patch it will always have 
>> "application/octet-stream" and that makes some browsers unhappy.
> 
> 
> Any objections to me merging this patch:

Actually, I think you could make a case for having 'content_type' in the 
  '.metadata' file *override* any guessed values.  Other than that, +1 
on the change.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com



More information about the Zope-CMF mailing list