this should fix an issue where Content-Type: text/plain was sent regardless of the actual mime type