From 9a1cb623369137f62216770e792ff2a0ae04ef16 Mon Sep 17 00:00:00 2001 From: yssk22 Date: Sat, 27 Apr 2013 12:39:40 +0900 Subject: [PATCH] Cookie attribute name should be case-insensitive --- lib/cookie/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cookie/index.js b/lib/cookie/index.js index 2fe9907..3cda489 100644 --- a/lib/cookie/index.js +++ b/lib/cookie/index.js @@ -28,7 +28,7 @@ var Cookie = exports = module.exports = function Cookie(str, req) { // Map the key/val pairs str.split(/ *; */).reduce(function(obj, pair){ pair = pair.split(/ *= */); - obj[pair[0]] = pair[1] || true; + obj[pair[0].toLowerCase()] = pair[1] || true; return obj; }, this);