Answering koshuke's question: Yes, I am using the Winstone servlet engine.
I found (in Winstone's issue list) your request for more default mime types in
the Winstone resources
(http://sourceforge.net/tracker/index.php?func=detail&aid=1746201&group_id=98922&atid=622500).
The mime types in the Winstone properties are:
WebAppConfig.DefaultMimeTypes=jpg=image/jpeg:jpeg=image/jpeg:gif=image/gif:css=text/css:js=text/javascript:pdf=application/pdf:txt=text/plain:html=text/html:png=image/png:zip=application/zip:jar=application/java-archive
I added some extra extension/mime-type combinations to the Hudson web.xml, as
Rick Knowles (Winstone author) suggested.
That works, but of course my changes will be gone in the next Hudson update.
Could you add some entries to the Hudson web.xml?
Some extensions I am missing are:
xml: text/xml
xslt: application/xslt+xml or text/xml
ear: ???? (don't know if a mime-type exists)
war: ???? (don't know if a mime-type exists)
Even better would be a way to add your own mappings external to Hudson, but that
would mean an enhancement to the servlet container (Winstone in my case) not
Hudson itself.
Well, maybe I should switch to a servlet container that supports this by
default, we deploy our own application on Oracle Application Server (Weblogic in
the future), so I could use that. I like the simplicity of the embedded Winstone
container though.
My case is a bit different, but I suspect it has the same code behind it.
I want to display a xml file from my workspace which has a link to xslt in it.
The 'view' link displays the text, but without the xslt applied (I can
understand that). The link to the file itself opens an 'Open with...' dialog,
because the Content-type is application/octet-stream.
Can the content-type be automatically detected from the file extension?