Skip to content

Commit

Permalink
Fixing hasBody check that didn't work when content-length was not def…
Browse files Browse the repository at this point in the history
…ined.
  • Loading branch information
paulhill committed Jul 3, 2013
1 parent b86667e commit 6e8faa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ exports.brokenPause = parseInt(nodeVersion[0], 10) === 0

exports.hasBody = function(req) {
return 'transfer-encoding' in req.headers
|| req.headers["content-length"] !== '0';
|| ('content-length' in req.headers && req.headers["content-length"] !== '0')
|| 'content-type' in req.headers;
};

/**
Expand Down

0 comments on commit 6e8faa7

Please sign in to comment.