From e5f3807c68ebca59b8d321077ece8f3846eb2084 Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Mon, 14 Nov 2011 15:04:20 -0700
Subject: [PATCH] queue up post bodies on browserid before forwarding to
 dbwriter

---
 lib/wsapi.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/wsapi.js b/lib/wsapi.js
index 38838543e..32d82b6db 100644
--- a/lib/wsapi.js
+++ b/lib/wsapi.js
@@ -143,7 +143,11 @@ exports.setup = function(options, app) {
       // cookie parsing, nor body parsing - leaving that up to the process we're forwarding
       // to.
       if (-1 !== forwardedOperations.indexOf(operation)) {
-        return next();
+        // queue up the body here on and forward a single unchunked request onto the
+        // writer
+        return bodyParser(req, resp, function() {
+          next();
+        });
       } else {
         // this is not a forwarded operation, perform full parsing and validation
         return cookieParser(req, resp, function() {
-- 
GitLab