Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update connect

  • Loading branch information...
commit 612fc47044ddcc54d66236416ea153a48ad5c173 1 parent 12d9716
@tj tj authored
Showing with 4 additions and 2 deletions.
  1. +2 −1  lib/response.js
  2. +2 −1  package.json
View
3  lib/response.js
@@ -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
@@ -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));
View
3  package.json
@@ -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",
@@ -19,6 +19,7 @@
"fresh": "0.1.0",
"methods": "0.0.1",
"send": "0.1.0",
+ "cookie-signature": "0.0.1",
"debug": "*"
},
"devDependencies": {
Please sign in to comment.
Something went wrong with that request. Please try again.