Skip to content
Myr

Styling

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

authored by visionmedia · committed by visionmedia · parent 880aca5 · Browse files · 1 file+11 added−14 removed
This commit

State

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

Diff stats

1 file+11 added−14 removed

  • other:+11 added−14 removed

1 file+11 added−14 removed

modified:lib/express/plugins/session.js+11 added-14 removed
204 unmodified lines
205 * Create session id when not found; delegate to store.206 */207 208 request: function(event, next) {209 var sid= event.request.cookie('sid');210 exports.Session.store.fetch(sid, function(error, session) {211 if( error ) next(error);212 else {213 // If an invalid session id was passed then the id can change214 if( session.id != sid ) 215 event.request.cookie('sid', session.id, exports.Session.cookie)216 217 event.request.session= session;218 event.request.session.touch();219 next(); 220 }221 }); 222 return true;209 var sid = event.request.cookie('sid')210 exports.Session.store.fetch(sid, function(err, session) {211 if (err) return next(err)212 if (session.id != sid) 213 event.request.cookie('sid', session.id, exports.Session.cookie)214 215 event.request.session = session216 event.request.session.touch()217 next()218 })219 return true220 },221 222 /**223 * Delegate to store, allowing it to save sessions changes.
8 unmodified lines