]> git.proxmox.com Git - proxmox-widget-toolkit.git/commit
data/ProxmoxProxy: set responseType to undefined for XMLHTTPRequest
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 26 May 2021 08:58:29 +0000 (10:58 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 27 May 2021 11:37:36 +0000 (13:37 +0200)
commitfba354621f83f42b5649977b8e0c2e4a7e1991b7
tree9292d5c2cf5ff1a4320b375a260fc6e705707294
parentd00e8b940ad6ad1e5fd1f293c6e00df0f73ab77d
data/ProxmoxProxy: set responseType to undefined for XMLHTTPRequest

extjs 7.0 gives the responseType to the XMLHTTPRequest (which
is 'json' for a json reader), but that means that the response is
automatically decoded by the browser, with no means to get the original
return back

in our case, for successful api calls it would work, but some of our
errors are plain text, not json, so the decoded json object is 'null'
and we lose the error information

revert the type to 'undefined' which tells the browser not do do any
decoding

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/data/ProxmoxProxy.js
src/data/reader/JsonObject.js