Skip to content
Myr

Changed `res.{cookie,clearCookie}()` return res

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 4b8e08d · Browse files · 1 file+3 added−1 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+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:lib/response.js+3 added-1 removed
265 unmodified lines
266 * Clear cookie `name`.267 *268 * @param {String} name269 * @param {Object} options270 * @param {ServerResponse} for chaining271 * @api public272 */273274res.clearCookie = function(name, options){275 var opts = { expires: new Date(1) };275 this.cookie(name, '', options276 return this.cookie(name, '', options277 ? utils.merge(options, opts)278 : opts);279};280
24 unmodified lines
305 if ('maxAge' in options) options.expires = new Date(Date.now() + options.maxAge);306 if (undefined === options.path) options.path = this.app.set('home');307 var cookie = utils.serializeCookie(name, val, options);308 this.header('Set-Cookie', cookie);309 return this;310};311312/**313 * Redirect to the given `url` with optional response `status`
93 unmodified lines