Skip to content

Commit

Permalink
fix cookies var behing shadowed by function name
Browse files Browse the repository at this point in the history
  • Loading branch information
oberhamsi committed Jun 14, 2011
1 parent 1df525c commit e6bef48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/stick/middleware/cookies.js
Expand Up @@ -13,7 +13,7 @@
*/
exports.middleware = function session(next, app) {

return function cookies(req) {
return function (req) {

/**
* A cookies object for the current request.
Expand All @@ -22,8 +22,8 @@ exports.middleware = function session(next, app) {
Object.defineProperty(req, "cookies", {
get: function() {
if (!cookies) {
cookies = new ScriptableMap();
var servletCookies = servletRequest.getCookies();
var cookies = new ScriptableMap();
var servletCookies = req.env.servletRequest.getCookies();
if (servletCookies) {
servletCookies.forEach(function(cookie) {
cookies[cookie.getName()] = cookie.getValue();
Expand Down

0 comments on commit e6bef48

Please sign in to comment.