multipart allow body === '' ( the empty string ) #255

Merged
merged 1 commit into from Jun 4, 2012

Projects

None yet

2 participants

@Filirom1
Contributor

Hi

When sending POST request, with empty fields (multipart/form-data), request fails with the message Body attribute missing in multipart..

body === null and body === undefined should be avoided,
but not body === 0 or body === ""

Here is a dump of what I want to send (done with chrome) :

------WebKitFormBoundaryya1smvvViLvINIOb

Content-Disposition: form-data; name="title"





------WebKitFormBoundaryya1smvvViLvINIOb

Content-Disposition: form-data; name="upload"; filename=""

Content-Type: application/octet-stream





------WebKitFormBoundaryya1smvvViLvINIOb--
@mikeal mikeal merged commit 4c91de3 into request:master Jun 4, 2012
@naholyr naholyr added a commit to naholyr/doggybag that referenced this pull request Jun 26, 2012
@naholyr naholyr Remove test involving empty form until request/request#255 is publish…
…ed to npm
461b6db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment