Skip to content
Myr

Fixed res.clearCookie(), default path to "root" setting

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 bc673be · Browse files · 3 files+22 added−4 removed
This commit

State

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

Diff stats

3 files+22 added−4 removed

  • tests:+19 added−1 removed
  • other:+3 added−3 removed

3 files+22 added−4 removed

modified:lib/application.js+1 added-1 removed
77 unmodified lines
78app.defaultConfiguration = function(){79 var self = this;8081 // default settings82 this.set('home', '/');82 this.set('root', '/');83 this.set('env', process.env.NODE_ENV || 'development');8485 // always parse req.query86 this.use(connect.query());
506 unmodified lines
modified:lib/response.js+2 added-2 removed
332 unmodified lines
333 * @api public334 */335336res.clearCookie = function(name, options){337 var opts = { expires: new Date(1) };337 var opts = { expires: new Date(1), path: this.app.get('root') };338 return this.cookie(name, '', options339 ? utils.merge(options, opts)339 ? utils.merge(opts, options)340 : opts);341};342343/**
213 unmodified lines
modified:test/res.clearCookie.js+19 added-1 removed