From f51f6bf774d7acf3304f516e2ff0af4f4e05fff1 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 23 Jun 2016 16:23:36 +0100 Subject: [PATCH] Fix URI in "put" save handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don’t want the location hash --- core/modules/savers/put.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/savers/put.js b/core/modules/savers/put.js index ee33a83df..39f1ca18c 100644 --- a/core/modules/savers/put.js +++ b/core/modules/savers/put.js @@ -24,7 +24,7 @@ var PutSaver = function(wiki) { // Async server probe. Until probe finishes, save will fail fast // See also https://github.com/Jermolene/TiddlyWiki5/issues/2276 var req = new XMLHttpRequest(); - req.open("OPTIONS", encodeURI(window.location.href)); + req.open("OPTIONS",encodeURI(document.location.protocol + "//" + document.location.hostname + ":" + document.location.port + document.location.pathname)); req.onload = function() { // Check DAV header http://www.webdav.org/specs/rfc2518.html#rfc.section.9.1 self.serverAcceptsPuts = (this.status === 200 && !!this.getResponseHeader('dav'));