avoid notice in mime()
Merge pull request #1490 from dereuromark/2.4-mime

2.4 mime