Re: Feedback on Image modules

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 UTC