W3C home > Mailing lists > Public > www-style@w3.org > December 2010

Re: Feedback on Image modules

From: Karl Dubost <karld@opera.com>
Date: Fri, 17 Dec 2010 23:12:23 -0500
Message-Id: <C7DF04D2-46BD-48B2-B42C-5C4C6544F1ED@opera.com>
Cc: Charles Pritchard <chuck@jumis.com>, Anthony Ricaud <anthony@ricaud.me>, Anne van Kesteren <annevk@opera.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
To: Brad Kemper <brad.kemper@gmail.com>

Le 17 déc. 2010 à 19:59, Brad Kemper a écrit :
> Is isn't good for selecting formats you do support, but isn't it still helpful for eliminating those you don't support? For instance, you could peek further for '.php', but not bother to do so for '.psd' if you know you won't support Photoshop files.  

The issue is that the 3 last characters of a string is not a reliable indicator of what the file is. Trusting what is written in these character strings will lead to breakage. 

http://www.la-grange.net/2010/12/17/foo.gif

curl -sI http://www.la-grange.net/2010/12/17/foo.gif
HTTP/1.1 200 OK
Date: Sat, 18 Dec 2010 04:11:48 GMT
Content-Location: foo.gif.png
Last-Modified: Sat, 18 Dec 2010 03:12:31 GMT
Accept-Ranges: bytes
Content-Length: 782
Expires: Sat, 25 Dec 2010 04:11:48 GMT
Content-Type: image/png



-- 
Karl Dubost - http://dev.opera.com/
Developer Relations & Tools, Opera Software
Received on Saturday, 18 December 2010 04:13:30 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:35 GMT