Try uploading a file with a space in its extension:
- Go to Special:Upload
- Pick some .jpg file
- Change the destination filename field to end in ". jpg" (note space between . and jpg)
- Submit!
It should translate the " " to "_" immediately, then reject the file as a whole as "._jpg" is not recognized.
However, it seems to be allowing the upload through; file type is detected using the trimmed "jpg" form, but the web server of course doesn't know "._jpg" and serves it as a binary file which causes confusion.
Some on-wiki discussion:
http://en.wikipedia.org/wiki/Wikipedia:VPT#Image_does_not_display.2C_rather_attempts_to_download
Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/wiki/File:%22City_of_India,Actress_Prachee_Adhikari_for_some_promotion,New_Delhi_1_-_Oct_2007._jpg