Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


default req.body to {} regardless of content-type #354

tj opened this Issue · 4 comments

3 participants

tj commented

perhaps a little misleading since it will look like you may have an appropriate content-type with no body, but it's pretty fragile otherwise, I've seen quite a bit of code including some of my own assuming its presence:'/foo', function(req, res){

for example will break if you dont post json or x-www-form-urlencoded data

@ryanrolds ryanrolds referenced this issue from a commit in ryanrolds/connect
@ryanrolds ryanrolds Default req.body to {} per #354 ae832c5
@tj tj closed this

awesome, I've been having the same issue since a while too.


This change breaks connect-form, which won't do its job unless body === undefined.

tj commented

@pacovell yeah I saw that in connect-form's issues. 1.8.0 adds req.body support for multipart now


Great, will check that out. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.