Skip to content
Browse files

Removed `req.rawBody` from `bodyParser()`

  • Loading branch information...
1 parent 41c543a commit c3170eee8cd60c92bcccca6054c1ebbb93a1a821 @tj tj committed
Showing with 0 additions and 1 deletion.
  1. +0 −1 lib/middleware/bodyParser.js
1 lib/middleware/bodyParser.js
@@ -63,7 +63,6 @@ exports = module.exports = function bodyParser(){
req.on('data', function(chunk) { data += chunk; });
req.on('end', function(){
- req.rawBody = data;
try {
req.body = data
? parser(data)

6 comments on commit c3170ee


any reason on why this was removed?
why private the developer of having access to the data being sent?

Sencha Labs member

because people were asking for it all over, buffering everything is not a good idea, there's no real reason to support this


Thanks for the answer.

I agree that buffering is not good. Still there are plenty of things that could be done easily without adding another parser in the game.
Maybe adding an option default to false. Although I give you reason about buffering, I wouldn't limit my tool because of the bad usage of few. It's like limiting the speed of my Ferrari because people may abuse of it.

In my case: I can't change some legacy systems to properly use my tool. But adding a bunch of middlewares to solve such a small problem also doesn't look good to me, since the data was already there.


removing it completely is a bit extreme... perhaps having it off by default and having a setting to having it capture would be better?

Sencha Labs member

@reklis it's not hard to add this back at all, like a 3 or 4 line middleware, having it just for bodyParser is really weird

Sencha Labs member

and it has nothing to do with parsing a body

Please sign in to comment.
Something went wrong with that request. Please try again.