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

Fix multipart encoding #771 #774

Merged
merged 1 commit into from
Apr 18, 2013
Merged

Fix multipart encoding #771 #774

merged 1 commit into from
Apr 18, 2013

Conversation

tillre
Copy link
Contributor

@tillre tillre commented Apr 18, 2013

Formidable gets the payload buffer after .toString('utf-8') has been called on it. This works for text, but not for binary data in a multipart request. I changed the payload.parse method to pass the 'raw' payload buffer to formidable and updated the test. The test now passes a stream to form-data, so that it encodes the binary data as file in the multipart request and formidable recognizes it as such. The test then compares the filesize and the actual file contents of the source file and the written tmp file. Would be nice if you can take a look at it.

hueniverse pushed a commit that referenced this pull request Apr 18, 2013
@hueniverse hueniverse merged commit a2216d8 into hapijs:master Apr 18, 2013
jmonster pushed a commit to jmonster/hapi that referenced this pull request Feb 10, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants