For response has body and no `content-type` header, try to parse the body using xml format.
This commit is contained in:
Родитель
dd231a4db0
Коммит
c53ac4523e
|
@ -8,6 +8,7 @@ ALL
|
|||
* Fixed the issue that `BatchOperation` doesn't support socket reuse for some node versions.
|
||||
* Fixed the issue that `BatchOperation` request pool size is too big when the socket reuse is supported.
|
||||
* Added empty headers to string-to-sign.
|
||||
* For response has body and no `content-type` header, try to parse the body using xml format.
|
||||
|
||||
BLOB
|
||||
* Added support for large block blob.
|
||||
|
|
|
@ -846,7 +846,8 @@ StorageServiceClient._parseResponse = function (response, xml2jsSettings, option
|
|||
} else if (contentType.indexOf('text/html') !== -1) {
|
||||
response.body = response.body;
|
||||
} else {
|
||||
throw new SyntaxError(SR.CONTENT_TYPE_MISSING, null);
|
||||
response.body = parseXml(response.body);
|
||||
// throw new SyntaxError(SR.CONTENT_TYPE_MISSING, null);
|
||||
}
|
||||
} catch (e) {
|
||||
response.error = e;
|
||||
|
|
Загрузка…
Ссылка в новой задаче