Skip to content
Myr

fixing cookies for connect 2.3.1

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 8930cd5 · Browse files · 4 files+14 added−12 removed
This commit

State

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

Diff stats

4 files+14 added−12 removed

  • tests:+11 added−10 removed
  • other:+3 added−2 removed

4 files+14 added−12 removed

modified:lib/response.js+2 added-2 removed
10 unmodified lines
11 , normalizeType = require('./utils').normalizeType12 , normalizeTypes = require('./utils').normalizeTypes13 , statusCodes = http.STATUS_CODES14 , send = connect.static.send15 , cookie = require('cookie')16 , crc = require('crc')17 , mime = require('mime')18 , basename = path.basename19 , extname = path.extname
461 unmodified lines
481 if ('object' == typeof val) val = 'j:' + JSON.stringify(val);482 if (signed) val = utils.sign(val, secret);483 if ('maxAge' in options) options.expires = new Date(Date.now() + options.maxAge);484 if (null == options.path) options.path = '/';484 var cookie = utils.serializeCookie(name, val, options);485 this.set('Set-Cookie', cookie);485 this.set('Set-Cookie', cookie.serialize(name, val, options));486 return this;487};488489/**
158 unmodified lines
modified:test/res.clearCookie.js+2 added-2 removed
modified:test/res.cookie.js+9 added-8 removed
modified:package.json+1 added
12 unmodified lines
13 "connect": "2.3.1",14 "commander": "0.6.1",15 "mime": "1.2.5",16 "mkdirp": "0.3.2",17 "cookie": "0.0.3",18 "crc": "0.2.0",19 "debug": "*"20 },21 "devDependencies": {
20 unmodified lines