Skip to content
Myr

Added parseCookie()

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

authored by visionmedia · committed by visionmedia · parent a2d8230 · Browse files · 2 files+15 added−0 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+15 added−0 removed

  • tests:+7 added−0 removed
  • other:+8 added−0 removed

2 files+15 added−0 removed

modified:lib/express.core.js+8 added
159 unmodified lines
160 161 return params162 },163 164 parseCookie : function(cookie) {165 var hash = {}166 var attrs = cookie.split(';')167 for (i = 0; i < attrs.length; ++i)168 hash[attrs[i].split('=')[0]] = attrs[i].split('=')[1]169 return hash170 },171 172 /**173 * Normalize a path. Strips trailing / leading whitespace174 * and slashes ('/').175 *
253 unmodified lines
modified:spec/spec.core.js+7 added