On 9/7/10 3:29 PM, Aryeh Gregor wrote:
* Sniff only if Content-Type is typical of what popular browsers serve for unrecognized filetypes. E.g., only for no Content-Type, text/plain, or application/octet-stream, and only if the encoding is either not present or is UTF-8 or ISO-8859-1. Or whatever web servers do here. * Sniff the same both for video tags and top-level browsing contexts, so "open video in new tab" doesn't mysteriously fail on some setups.
I could probably live with those, actually.
* If a file in a top-level browsing context is sniffed as video but then some kind of error is returned before the video plays the first frame, fall back to allowing the user to download it, or whatever the usual action would be if no sniffing had occurred.
This might be pretty difficult to implement, since the video decoder might consume arbitrary amounts of data before saying that there was an error.
-Boris