From 257bc31e0b7f6e27694d220d541723c8f83fb96c Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Wed, 30 Jan 2013 18:08:47 +0000 Subject: [PATCH] #284 s/[]/""/ --- lib/router.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/router.js b/lib/router.js index 43f03c58b..465cfd7fe 100644 --- a/lib/router.js +++ b/lib/router.js @@ -383,7 +383,8 @@ Router.prototype.find = function find(req, res, callback) { } // Last, check request-headers var ok = true; - (headers || []).forEach(function (h) { + /* JSSTYLED */ + (headers || '').split(/\s*,\s*/).forEach(function (h) { h = h.toLowerCase(); ok = ALLOW_HEADERS.indexOf(h) !== -1 && ok; });