- From: Joshua Bell <notifications@github.com>
- Date: Thu, 16 Jul 2015 16:10:25 -0700
- To: w3c/FileAPI <FileAPI@noreply.github.com>
- Message-ID: <w3c/FileAPI/issues/13@github.com>
In the definition for the `type` attribute, the spec has: > The ASCII-encoded string in lower case representing the media type of the `Blob`. On getting, user agents must return the type of a `Blob` as an ASCII-encoded string in lower case, such that when it is converted to a byte sequence, it is a _parsable MIME type_ [MIMESNIFF], or the empty string -- 0 bytes -- if the type cannot be determined. There's a fair bit weird about that paragraph (e.g. 'ASCII-encoded' when the entry points which set the `type` already reject non-ASCII input, referring to the length of the string in bytes...). But neither Chrome nor Firefox appear to do the filtering of non-parsable MIME types: ```js new Blob(['yo'], {type: "te?xt/plain"}).type; // "te?xt/plain" ``` Even if we decide to keep the spec and file/fix implementation bugs, can we rejigger the spec so that the entry points that set `type` (constructors, `slice()`) do all of the filtering work, rather than spreading it across two parts of the spec? (Unless there's subtlety I'm missing...) cc: @annevk @Ms2ger --- Reply to this email directly or view it on GitHub: https://github.com/w3c/FileAPI/issues/13
Received on Thursday, 16 July 2015 23:10:55 UTC