Doing some research about SMF bugs, I found quite a lot where firefox would be blamed...
Changing UA in opera 12.16 from "Identify as Firefox" to "Identify as Opera" results in correct default filename and ability to open .png directly in browser, however text files still appear wrongly as application/octetstream and can not be directly displayed in browser.
With elinks 0.11.7 I could display text files, but when trying to pass a .png image to an image viewer, a temporary file with a .php extension is created in /tmp, which can not be used by image viewers relying on filename extensions...