From 21a042a90a3cd247039fdb9f5b4ff7ebc329b49b Mon Sep 17 00:00:00 2001 From: Charles Daniel Date: Tue, 25 Sep 2012 10:50:43 -0400 Subject: [PATCH] Adding "auth=" prefix to the captureToken (while removing any that may exist) This should fix the InvalidServerResponse responses from issue https://github.com/SpeCT/node-c2dm/issues/16 --- lib/c2dm.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/c2dm.js b/lib/c2dm.js index 17d2ec3..b539a8d 100644 --- a/lib/c2dm.js +++ b/lib/c2dm.js @@ -38,6 +38,7 @@ util.inherits(C2DM, emitter); exports.C2DM = C2DM; C2DM.prototype.captureToken = function(err, token) { + token = 'auth=' + token.replace(/Auth=/i,''); this.token = token; };