Not only that, but you can't draw conclusions based on the "extension",
since the Web didn't originate in the Microsoft world, and thus doesn't
understand extensions. There's nothing that prevents a web server from
serving you a Word document named foo.xyz (or even foo.jpg) with the mime
type application/ms-word.
Vice versa, a *.doc file might just as well be an image or html. If you
don't trust the web server in the first place, trusting the "extensions"
is
rather silly