From 34799263eba359a2e08e9ed2c56d2ecdf94c796c Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 12 Mar 2018 22:39:19 +0300 Subject: [PATCH] fixup 259f3732: only switch to POST if 'body' wasn't customized --- js/messaging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/messaging.js b/js/messaging.js index e5bb1f86..6de837f0 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -462,7 +462,7 @@ function sessionStorageHash(name) { */ function download(url, { method = 'GET', - body = null, + body, responseType = 'text', requiredStatusCode = 200, timeout = 10e3, @@ -471,7 +471,7 @@ function download(url, { }, } = {}) { const queryPos = url.indexOf('?'); - if (queryPos > 0) { + if (queryPos > 0 && body === undefined) { method = 'POST'; body = url.slice(queryPos); url = url.slice(0, queryPos);