For response has body and no `content-type` header, try to parse the body using xml format.

This commit is contained in:
hasonmsft 2016-12-21 17:55:11 +08:00
Родитель dd231a4db0
Коммит c53ac4523e
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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;