from cherrypy.lib.cptools import serveFile

@expose()
def f(self):
   return serveFile(pathtofile, content_type='application/xpi')


On 11 okt, 07:50, jostheim <[EMAIL PROTECTED]> wrote:
> I have a weird one.  I am trying to serve a firefox xpi file (static
> file) and the content-type is being set to "text/plain" when the file
> is actually a sort of zip file.  This would be fine except that
> firefox interperts that content-type as something it should download,
> not install (I verified this serving the same static file using tomcat
> which does not set the content-type and where firefox dutifully
> installs the xpi file).  All I really need is for TG to not set the
> content-type at all (especially since it doesn't know what it is).
>
> How do I either let TG/Cherrypy know about this content-type and what
> to set it to or have TG stop setting content-types on unknown static
> files?  Or insert other workaround here.
>
> Thanks,
>
> James


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to