Currently, action=raw will return text/x-wiki for all content (except for JS and CSS pages, but even then, the property MIME type will only be used if requested with the ctype or gen parameter).
This is a relict from times before ContentHandler. With ContentHandler, page content knows its mime type. RawAction should ask ContentHandler for the default serialization format if ctype and gen are not given. It should use Content::serialize to generate the desired output format. And finally, it should declare the actual format used for serialization in the Content-Type header.