Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with MIME types #170

Open
andreubotella opened this issue Apr 26, 2021 · 2 comments · May be fixed by #172
Open

Issues with MIME types #170

andreubotella opened this issue Apr 26, 2021 · 2 comments · May be fixed by #172

Comments

@andreubotella
Copy link
Member

andreubotella commented Apr 26, 2021

As part of my work on defining the multipart/form-data parser, I noticed a couple things in the File API standard related to MIME types:

The second point implies that on a response coming from the fetch API that for whatever reason happened to have the MIME type multipart/form-data; boundary=cadena-de-separación (notice the ó), response.formData() might succeed but response.blob() would fail, which would seem paradoxical.

The third point implies that if, for whatever reason, there was a response coming from the fetch API which contained an actual multipart/form-data payload coming from Chromium or WebKit (since they start their boundary strings with WebKitFormBoundary), and a developer decoded it as a Blob; trying to parse that blob afterwards with new Request(blob).formData() would fail, since the boundary string seems to be parsed case-sensitively.

@annevk
Copy link
Member

annevk commented Apr 26, 2021

This is largely a duplicate of #43 I think.

@andreubotella
Copy link
Member Author

Points 2 and 3 can be part of #43, but the first point is an unrelated editorial fix. I'll file a PR.

andreubotella pushed a commit to andreubotella/FileAPI that referenced this issue May 11, 2021
The term "parsable MIME type" used to be part of the MIME Sniffing
standard, but it was removed in whatwg/mimesniff#36. This change
replaces its uses with equivalent phrasing that references the "parse a
MIME type" algorithm. It also replaces mentions of "ASCII-encoded
strings" with the Infra standard's definition of "ASCII string".

Closes w3c#170.
jimmywarting referenced this issue in nodejs/node May 14, 2021
The `Blob` object is an immutable data buffer. This is a first step
towards alignment with the `Blob` Web API.

Signed-off-by: James M Snell <[email protected]>

PR-URL: #36811
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants