fix thinko; fn args in wrong order
type-check MIME types to avoid another confusion with page text