-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
enforce lowercase letter on multipart boundary #6251
Comments
The question of whether content types belong case-sensitive or case-insensitive is a surprisingly messy one. It does seem to me "obvious" from this example that the boundary= parameter for a multipart/form-data should be consistently case-sensitive, if there's a way to actually do that without breaking anything else, but I'm not so sure whether there is. |
Imo i think the boundary was such a old, bad design decisions when it was invented. if each body part had a
|
I think we should fix |
That sounds reasonable. Restricting boundary to only lowercase solves only one of many other problems with Blob's type. You can close this if you wish |
One thing that have bother me before is that the boundary header and the Blob's
type
can't work in sync.what do i mean by that?
The boundary that gets generated in webkit (blink & safari) contains uppercase letters. Firefox seems to use only numbers and that is fine. But if you want to generate a blob out of a FormData for later use (for postMessaging, caching / reuse or what not) that's when you get into some issues.
When you construct a blob (or file) then the
type
is spec'ed to be transformed to all lowercased letters.(I did have mixed upper/lower case letter but was resolved by removing the uppercase letters when generating a boundary)
new Response(formData).blob()
This can be resolved if just all browser just didn't use any uppercase letters in the boundary. (or if the blob type wasn't casted to all lowercase letters)
The text was updated successfully, but these errors were encountered: