How does MIME handling exactly work?