If you want to use this function instead of the mimetypes module, you need to change the return value:  drop the "Content-Type: " part from it.