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

Ensure correct XHR encoding for multipart/form-data forms #174

Merged
merged 1 commit into from
Aug 15, 2018

Conversation

BehindTheMath
Copy link
Collaborator

Fixes #168

@robinnorth
Copy link
Collaborator

Do we need to explicitly set the request's Content-Type to multipart/form-data when sending a request with FormData? I haven't had time to test this myself yet, sorry. Real life has been getting in the way of things lately!

@BehindTheMath
Copy link
Collaborator Author

Do we need to explicitly set the request's Content-Type to multipart/form-data when sending a request with FormData?

No. The XHR spec specifies that if the Content-Type is not explicitly set, it's inferred from the body.

@robinnorth
Copy link
Collaborator

Thanks for that spec link. Your change looks good to me given that clarification.

@BehindTheMath BehindTheMath merged commit 6f39767 into master Aug 15, 2018
@BehindTheMath BehindTheMath deleted the fix/multipart-form-data branch August 15, 2018 19:07
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 this pull request may close these issues.

2 participants