added the ability to override the mime type of a given source
modified some of the code to stop internal apache bits from leaking errors all over end-users