From 4e642ded1e2191b695a1f6c00a357706e1903670 Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Tue, 22 Nov 2011 09:50:33 -0700
Subject: [PATCH] workaround bug in node 0.4.x - res.getHeader() throws an
 exception when invoked after a response is set, even though you're not
 mutating the response.  instead use the _headers map.

---
 lib/wsapi/authenticate_user.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/wsapi/authenticate_user.js b/lib/wsapi/authenticate_user.js
index 28af6a735..c25e44e60 100644
--- a/lib/wsapi/authenticate_user.js
+++ b/lib/wsapi/authenticate_user.js
@@ -55,7 +55,7 @@ exports.process = function(req, res) {
             path: '/wsapi/update_password',
             method: "POST",
             headers: {
-              'Cookie': res.getHeader('set-cookie'),
+              'Cookie': res._headers['set-cookie'],
               'Content-Type': 'application/x-www-form-urlencoded',
               'Content-Length': post_body.length
             }
-- 
GitLab