{"action":"created","issue":{"url":"https://api.github.com/repos/expressjs/body-parser/issues/83","labels_url":"https://api.github.com/repos/expressjs/body-parser/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/expressjs/body-parser/issues/83/comments","events_url":"https://api.github.com/repos/expressjs/body-parser/issues/83/events","html_url":"https://github.com/expressjs/body-parser/issues/83","id":60560027,"number":83,"title":"Always export raw body buffer.","user":{"login":"lxe","id":1486609,"avatar_url":"https://avatars.githubusercontent.com/u/1486609?v=3","gravatar_id":"","url":"https://api.github.com/users/lxe","html_url":"https://github.com/lxe","followers_url":"https://api.github.com/users/lxe/followers","following_url":"https://api.github.com/users/lxe/following{/other_user}","gists_url":"https://api.github.com/users/lxe/gists{/gist_id}","starred_url":"https://api.github.com/users/lxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxe/subscriptions","organizations_url":"https://api.github.com/users/lxe/orgs","repos_url":"https://api.github.com/users/lxe/repos","events_url":"https://api.github.com/users/lxe/events{/privacy}","received_events_url":"https://api.github.com/users/lxe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-10T20:03:09Z","updated_at":"2015-03-10T20:14:29Z","closed_at":null,"body":"Instead of adding `raw` as a parser type, why not just always export the pre-parsed buffer as `req.rawBody`? \r\n\r\nThis way, if required, we can easily forward the unadulterated body buffer to upstream proxies and services, without the content-type conditionals required by the `raw` type."},"comment":{"url":"https://api.github.com/repos/expressjs/body-parser/issues/comments/78138042","html_url":"https://github.com/expressjs/body-parser/issues/83#issuecomment-78138042","issue_url":"https://api.github.com/repos/expressjs/body-parser/issues/83","id":78138042,"user":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T20:14:29Z","updated_at":"2015-03-10T20:14:29Z","body":"This would effectively mean every request would now require twice the RAM usage.\r\n\r\nIf you look in the readme, you should see that you should only be parsing the body if you need it. This means that if you are going to forward the body as a proxy, this module should not even get invoked on those requests at all and you can simply read raw from the req stream.\r\n\r\nIf you really want yo use twice the RAM, you can always (ab)use the verify function to use it to attach the raw body buffer to each request."}}