[Netsurf-develop] How to handle lying file extensions?
rjek at netsurf-browser.org
Sat Apr 21 18:02:09 BST 2007
David J. Ruck wrote:
> On 21 Apr 2007 Simon Smith <simon_smith at zen.co.uk> wrote:
>> I occasionally encounter files of one filetype, named as if they were
>> another. For example,
>> is a .gif with a jpg extension, as are pictures 1-9 in that series. I have
>> also seen Windows BMPs filetyped as PNG, I think it was. I've complained
>> about the BBC one;
> I've come across this several times, and it takes and escalation up to
> the website developers before you find someone that understands the
> problem. Then the response is usually a "so what, IE and FF handle it
> ok", or "can you show me a browser that doesn't work on". That makes
> things a little difficult as although there is now an experimental
> Windows version of NetSurf, its not easily available.
Of course, it's not the extension that matters, it's the MIME type it is
served with. It's perfectly possible to to serve a JPEG named as PNG
with the GIF MIME type, which I've seen before.
>> Netsurf refuses to display these images, but also makes it difficult to save
>> them so that they can be retyped appropriately. Not a bug in Netsurf,
>> really, but are there any plans afoot to work around web sites that
>> misbehave in this particular way?
> I suspect not, WebSurf's developers are very much wedded to the
> principle of doing things right or not at all.
WebSurf? :) Actually, we were discussing the other week how to rework
the image system, and one of the considerations was adding file-type
guessing to images that fail to decode properly.
More information about the netsurf-users