[Buildbot-devel] MIME types and WebStatus

Ian Bell ian.h.bell at gmail.com
Sun Aug 24 23:24:21 UTC 2014


Ok, this works for me:
https://github.com/CoolProp/CoolProp/blob/master/Web/develop/buildbot.rst#setting-mime-type-handler

Copied here for posterity:

To change the MIME types on the server so that unknown file types will map
properly to application/octet-stream, modify the buildbot.tac file to add
the following block:

from twisted.web.static import File

webdir = File("public_html")
webdir.contentTypes['.mexw32'] = 'application/octet-stream'
webdir.contentTypes['.mexw64'] = 'application/octet-stream'
webdir.contentTypes['.mexmaci64'] = 'application/octet-stream'
webdir.contentTypes['.jnilib'] = 'application/octet-stream'
webdir.contentTypes['.mexa64'] = 'application/octet-stream'
webdir.contentTypes['.oct'] = 'application/octet-stream'
webdir.contentTypes['.whl'] = 'application/octet-stream'
webdir.contentTypes['.dylib'] = 'application/octet-stream'




On Fri, Aug 22, 2014 at 3:19 PM, Ian Bell <ian.h.bell at gmail.com> wrote:

> I have a variety of binary files that are being uploaded to my
> public_html/binaries folder on the master, but the MIME type for all of
> them is text/html, so that when you click on the file, it is opened as a
> text file (gobbledly gook) rather than being downloaded.  How can I change
> this?  Is there a config file for twisted?
>
> This link (
> http://stackoverflow.com/questions/8832312/can-buildbot-webstatus-be-customized-to-return-content-type-other-than-text-html)
> doesn't seem promising.
>
> The idea of subclassing WebStatus is a bit daunting, but especially so
> since I can't find it.  Where does the source for html.WebStatus live?  I
> haven't been able to find the buildbot.status.html module in the source...
>
> In general, you are using sphinx, so it would be great if you could also
> include the source in the website.
>
> Thanks,
> Ian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20140825/bb308c6f/attachment.html>


More information about the devel mailing list