UnknownFileTypeServlet.py seems to already do this.

                        filetype = mimetypes.guess_type(filename)
                        mimeType = filetype[0]
                        mimeEncoding = filetype[1]

                        if mimeType==None:
                                mimeType = 'text/html'  # @@ 2000-01-27 ce: should 
this just be text?
                        response.setHeader('Content-type', mimeType)


If that's not working for you, maybe you need to give the mimetypes
module a hint on your filetypes.  You would want to update your
mime.types file.

On Fri, 2002-01-11 at 11:00, Federico Di Gregorio wrote:
> hi,
> 
> i didn't found a way to tell webware to set the correct mime type for
> served files (my problem is that css are server as text/html and not as
> text/css). i missed something or should i write the equivalent of
> mod_mime for webware? from were to start in that case? (and no, having a
> separate directory and serving files from there with apache is not an
> option, it is a kludge.)
> 
> ciao,
> federico
> 
> -- 
> Federico Di Gregorio
> Debian GNU/Linux Developer & Italian Press Contact        [EMAIL PROTECTED]
> INIT.D Developer                                           [EMAIL PROTECTED]
>   99.99999999999999999999% still isn't 100% but sometimes suffice. -- Me



_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to