Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

Does not work with current connect versions + Solution #6

Open
andywer opened this issue Sep 23, 2012 · 2 comments
Open

Does not work with current connect versions + Solution #6

andywer opened this issue Sep 23, 2012 · 2 comments

Comments

@andywer
Copy link

andywer commented Sep 23, 2012

Reason: There is no require('connect').utils.serializeCookie() anymore.

Solution: Change the call require('connect').utils.serializeCookie(...) [Line 603] to serializeCookie(...) and declare the following function (taken from an old connect version):

var serializeCookie = function(name, val, obj){
    var pairs = [name + '=' + encodeURIComponent(val)],
        obj = obj || {};

    if (obj.domain) pairs.push('domain=' + obj.domain);
    if (obj.path) pairs.push('path=' + obj.path);
    if (obj.expires) pairs.push('expires=' + obj.expires.toUTCString());
    if (obj.httpOnly) pairs.push('httpOnly');
    if (obj.secure) pairs.push('secure');

    return pairs.join('; ');
};
@cgencer
Copy link

cgencer commented Dec 3, 2013

ok, patched locally but heroku still has an automated mode_modules fetching, which always grabs the outdated script from npmjs repos. any clue on that?

@andywer
Copy link
Author

andywer commented Dec 3, 2013

You could use something like this in your package.json:

"repository" :
  { "type" : "git",
    "url" : "http://github.com/cgencer/patched-node-facebook-sdk.git"
  }

(see https://npmjs.org/doc/json.html)

But that's just a work-around. tenorviol would have to apply the modification to the code in his repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants