Skip to content
Myr

update connect

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 12d9716 · Browse files · 2 files+4 added−2 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+4 added−2 removed

  • other:+4 added−2 removed

2 files+4 added−2 removed

modified:lib/response.js+2 added-1 removed
5 unmodified lines
6 , http = require('http')7 , path = require('path')8 , connect = require('connect')9 , utils = connect.utils10 , sign = require('cookie-signature').sign11 , normalizeType = require('./utils').normalizeType12 , normalizeTypes = require('./utils').normalizeTypes13 , etag = require('./utils').etag14 , statusCodes = http.STATUS_CODES
562 unmodified lines
577 var secret = this.req.secret;578 var signed = options.signed;579 if (signed && !secret) throw new Error('connect.cookieParser("secret") required for signed cookies');580 if ('object' == typeof val) val = 'j:' + JSON.stringify(val);580 if (signed) val = 's:' + utils.sign(val, secret);581 if (signed) val = 's:' + sign(val, secret);582 if ('maxAge' in options) options.expires = new Date(Date.now() + options.maxAge);583 if (null == options.path) options.path = '/';584 this.set('Set-Cookie', cookie.serialize(name, String(val), options));585 return this;
134 unmodified lines
modified:package.json+2 added-1 removed