Skip to content
Myr

We cannot use(Cookie) within Session.init()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This is dueue to Session being above Cookie in the plugins stack, hence missing when the cookie data gets populated. With some re-working this can change, however it is not very important at the time. We can just use(Cookie) before Session.

authored by visionmedia · committed by visionmedia · parent 7d5f06b · Browse files · 2 files+2 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−3 removed

  • other:+2 added−3 removed

2 files+2 added−3 removed

modified:examples/chat/app.js+1 added
modified:lib/express/plugins/session.js+1 added-3 removed
3 unmodified lines
4/**5 * Module dependencies.6 */7 8var utils = require('express/utils'),9 Cookie = require('express/plugins/cookie').Cookie8var utils = require('express/utils')910// --- Session1112var Session = Class({
143 unmodified lines
156 * @api private157 */158 159 init: function(options) {161 use(Cookie)160 process.mixin(this, options)161 this.store = new (this.dataStore || exports.Store.Memory)(options)162 this.startReaper()163 },
42 unmodified lines