the MIME type check comes after the regular HTTP error check