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

blob type should not be all lowercased... #32582

Open
jimmywarting opened this issue Jan 28, 2022 · 0 comments
Open

blob type should not be all lowercased... #32582

jimmywarting opened this issue Jan 28, 2022 · 0 comments
Labels

Comments

@jimmywarting
Copy link
Contributor

Can we complement this list with something like:

const type     = 'Multipart/form-data; Boundary=ABC'
const expected = 'multipart/form-data; boundary=ABC'
new Blob([], {type}).type === expected

From what i understand (in this thread), the mimetype and keys (in mime/type; key=value) should be lowercased but the value shouldn't?
you loose valuable information by doing this... eg:

const res = new Response(new FormData())
const blob = await res.blob()

// multipart/form-data; boundary=----WebKitFormBoundaryLt9YzkQfzVBgA5nL
const expected = res.headers.get('content-type')

// multipart/form-data; boundary=----webkitformboundarylt9yzkqfzvbga5nl
const actual = blob.type

actual === expected // should be true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants