Skip to content
Myr

Fixed res.cookie() path default

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 5960b90 · Browse files · 2 files+3 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+3 added−3 removed

  • tests:+2 added−2 removed
  • other:+1 added−1 removed

2 files+3 added−3 removed

modified:lib/response.js+1 added-1 removed
363 unmodified lines
364365res.cookie = function(name, val, options){366 options = options || {};367 if ('maxAge' in options) options.expires = new Date(Date.now() + options.maxAge);368 if (undefined === options.path) options.path = this.app.set('basepath');368 if (undefined === options.path) options.path = this.app.set('root');369 var cookie = utils.serializeCookie(name, val, options);370 this.header('Set-Cookie', cookie);371 return this;372};
184 unmodified lines
modified:test/res.cookie.js+2 added-2 removed