cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agssa.net>
Subject Re: Cleanup forms/samples/resources
Date Mon, 29 Nov 2004 15:52:31 GMT
<cita quién="Klaus Bertram">
> Antonio Gallardo wrote:
>> <cita quién="Jorg Heymans">
>>
>>>
>>>Jeremy Quinn wrote:
>>>
>>><snip/>
>>>
>>>>Yes, I was one of the people always doing that !!!
>>>>I always assumed you needed to add the mime-type to the <map:read/>
so
>>>>needed specific pipelines for each type.
>>>>
>>>>Thanks for the tip !!!
>>>
>>>How does cocoon send the mimetype of a file then? Does it have a
>>>mime.types somewhere internally like apache? Or does it rely on the
>>>browser to interprete the binary stream correctly or guess it from the
>>>file extension?
>>
>>
>> Yep. From the file extension. Defined in the web.xml. For example in
>> Tomcat See:
>>
>> $TOMCAT_HOME/conf/web.xml
>>
>> For the no-defined applications, we can also add new ones in the Cocoon
>> web.xml file.
>>
>> Search for mime in both files.
> Hi all,
>
> this bothered me yesterday and I make some test with pdf, doc, rtf, xls
> documents. The reader send doc and xls docs at text when no mime-type
> attribute is given at the sitemap. There is also no Content Header added
> without the mime-type attribute.
>
> But the source says:
> public String getMimeType() {
>          Context ctx = ObjectModelHelper.getContext(objectModel);
>          if (ctx != null) {
>              final String mimeType = ctx.getMimeType(source);
>              if (mimeType != null) {
>                  return mimeType;
>              }
>          }
>
>          return inputSource.getMimeType();
>      }
> so if I see it correct the header should always appended. or I'm wrong?

Maybe the problem is related to (search for mime):

http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=110172091309354&w=2

Best Regards,

Antonio Gallardo


Mime
View raw message