From 0d7b238760b6cce7870d82ad9b3e7bf0bfec3b4b Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Mon, 19 May 2014 09:53:54 +1000 Subject: [PATCH] Bug 1009264 - Strip trailing slash from services.sync.tokenServerURI. r=ckarlof --- services/sync/modules/browserid_identity.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/sync/modules/browserid_identity.js b/services/sync/modules/browserid_identity.js index f686eece41a..3b0e290ffcf 100644 --- a/services/sync/modules/browserid_identity.js +++ b/services/sync/modules/browserid_identity.js @@ -441,6 +441,9 @@ this.BrowserIDManager.prototype = { // Refresh the sync token for our user. _fetchTokenForUser: function() { let tokenServerURI = Svc.Prefs.get("tokenServerURI"); + if (tokenServerURI.endsWith("/")) { // trailing slashes cause problems... + tokenServerURI = tokenServerURI.slice(0, -1); + } let log = this._log; let client = this._tokenServerClient; let fxa = this._fxaService;