Daniel 'NebuchadnezzaR' Dehennin wrote:
> 
> Hello,
> 
> Just for information, is it normal to not have a Content-Type if
> cherokee don't know the type ?
> 
> application/octet-stream is not a safe default ?
> 
> For exemple the inventory.knit in my example is served as text/plain
> charset=UTF-8 by apache2, maybe a little to weird for gziped data.

In theory HTTP/1.1 specifications allow servers to not send
Content-Type: header when they can't figure what kind of content
they are going to send.

In practice this behaviour is not optimal because
almost all browsers (including MSIE 6) are not smart enough
to properly figure what type of content a file has, i.e.
the fact that in a "file.c" (C language)
there are '<' and '>' brackets
does not mean the file is an html file !!!

So, right now, the optimal behaviour could be:

    - to add more popular file extensions
      to default mime configuration;

    - to send a default Content-Type of text/plain
      for files without any extension (after having removed
      mime encodings), i.e. README, ChangeLog, etc.;

    - to send a default Content-Type of application/octet-stream
      in all other cases so that browsers will try to download
      and save those kind of files instead of trying
      to show their contents.

Of course above behaviour should be configurable.

I'll try to do something like above proposals in late october,
because right now there are other things that need
to be revised / optimized in trunk (future 0.6.x).

Meanwhile any suggestion about the topic is welcome.

        Greetings.

-- 
Nick Name:     A.D.F.
E-Mail:        <adefacc () tin ! it>
--
_______________________________________________
Cherokee mailing list
Cherokee@0x50.org
http://www.0x50.org/cgi-bin/mailman/listinfo/cherokee

Reply via email to