cometd / cometd-nodejs-client

CometD client for NodeJS
Apache License 2.0
17 stars 7 forks source link

Cookies not being saved correctly #7

Closed marshalllamb closed 7 years ago

marshalllamb commented 7 years ago

salesforce.com sets 3 cookies on responses to handshakes and subscribes, but the logic in the XMLHttpRequest send() function is preserving cookies as individual array values instead of collapsing them into a single Cookie header. I modified the logic as follows, and it works:

    for (var i = 0; i < _cookies.length; ++i) {
        _config.headers['Cookie'] = _config.headers['Cookie'] + _cookies[i] + ';';
    }
sbordet commented 7 years ago

What version are you using ? This is supposed to be fixed in #2.

marshalllamb commented 7 years ago

1.0.0-BETA0

sbordet commented 7 years ago

Please install the version at tag beta, should be 1.0.0-BETA3.

marshalllamb commented 7 years ago

Thanks. That works.

Would you also add support for https? I doctored the require to be for 'https' instead of 'http' since the Bayeux server I'm connecting to only supports https. I can open another Issue if you want.

sbordet commented 7 years ago

The https issue is already resolved by #6. It's not been published to NPM yet, though.

sbordet commented 7 years ago

https support landed in 1.0.0-BETA4.