Skip to content

Commit

Permalink
update connect
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 2, 2012
1 parent 12d9716 commit 612fc47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/response.js
Expand Up @@ -7,6 +7,7 @@ var fs = require('fs')
, path = require('path')
, connect = require('connect')
, utils = connect.utils
, sign = require('cookie-signature').sign
, normalizeType = require('./utils').normalizeType
, normalizeTypes = require('./utils').normalizeTypes
, etag = require('./utils').etag
Expand Down Expand Up @@ -577,7 +578,7 @@ res.cookie = function(name, val, options){
var signed = options.signed;
if (signed && !secret) throw new Error('connect.cookieParser("secret") required for signed cookies');
if ('object' == typeof val) val = 'j:' + JSON.stringify(val);
if (signed) val = 's:' + utils.sign(val, secret);
if (signed) val = 's:' + sign(val, secret);
if ('maxAge' in options) options.expires = new Date(Date.now() + options.maxAge);
if (null == options.path) options.path = '/';
this.set('Set-Cookie', cookie.serialize(name, String(val), options));
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -10,7 +10,7 @@
{ "name": "Guillermo Rauch", "email": "rauchg@gmail.com" }
],
"dependencies": {
"connect": "2.6.0",
"connect": "2.6.2",
"commander": "0.6.1",
"range-parser": "0.0.4",
"mkdirp": "0.3.3",
Expand All @@ -19,6 +19,7 @@
"fresh": "0.1.0",
"methods": "0.0.1",
"send": "0.1.0",
"cookie-signature": "0.0.1",
"debug": "*"
},
"devDependencies": {
Expand Down

0 comments on commit 612fc47

Please sign in to comment.