Skip to content

Commit

Permalink
Read all the readable data
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Jun 25, 2014
1 parent 225bf82 commit f74d179
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/controller/init.js
Expand Up @@ -61,7 +61,10 @@ init = {
// probably not right
if (typeof req.read == 'function') {
req.addListener('readable', function (data) {
body += req.read();
var chunk;
while ((chunk = req.read())) {
body += chunk;
}
});
}
// Node 0.8, old streams
Expand Down

0 comments on commit f74d179

Please sign in to comment.