Skip to content
Myr

coerce res.cookie values to strings

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 02d4384 · Browse files · 2 files+2 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+2 added−2 removed

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

2 files+2 added−2 removed

modified:lib/response.js+1 added-1 removed
480 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 = '/';485 this.set('Set-Cookie', cookie.serialize(name, val, options));485 this.set('Set-Cookie', cookie.serialize(name, String(val), options));486 return this;487};488489/**
158 unmodified lines
modified:test/res.cookie.js+1 added-1 removed