Allow setting custom MIME headers

see description in the issue.