-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Boundary includes uppercase. Chrome always lowercases Blob.type. #17
Comments
See #18. |
Closed
Frankly this MUST be a bug in the specs. They shouldn't be messing with the case of header content. Can't believe no one else has noticed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm running into issues using this Polyfill to upload files in Chrome (possibly all WebKit). The server (a Rack server in Ruby) complains that the response is invalid, since it cannot find any multipart boundaries. A
EOFError
is raised during request body parsing.It turns out this is due to the following code:
https://github.com/jimmywarting/FormData/blob/master/FormData.js#L227
Which looks completely correct to me, however, in Chrome this causes the request body to use uppercase + lowercase characters, while the actual content type of the generated Blob is forced to lowercase, thus producing an invalid request. I was able to fix this by simply patching FormData to only use a lower case boundary.
Notice the
console.log
output of the Blob itself and the contents of the Blob.The text was updated successfully, but these errors were encountered: