Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

send cookies even if there is no headers

  • Loading branch information...
commit 87a49da50c7298cc21c10aef3e251896d2902789 1 parent 774fa10
Jonas Huckestein authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/cookie-sessions.js
View
4 lib/cookie-sessions.js
@@ -22,7 +22,9 @@ var exports = module.exports = function(settings){
var args = Array.prototype.slice.call(arguments);
var headers = (args.length > 1) ? args[args.length-1] : {};
-
+ if(args.length <= 1) {
+ args[1] = headers;
+ }
// Add a Set-Cookie header to all responses with the session data
// and the current timestamp. The cookie needs to be set on every
// response so that the timestamp is up to date, and the session
Please sign in to comment.
Something went wrong with that request. Please try again.