Preliminary support for better performance testing

This commit is contained in:
Fedor Indutny 2021-03-15 16:45:42 -07:00 committed by Josh Perez
parent fd8339e2ff
commit f98c3cba8c
3 changed files with 15 additions and 10 deletions

View file

@ -448,7 +448,9 @@ async function _promiseAjax(
} else if (
(options.responseType === 'json' ||
options.responseType === 'jsonwithdetails') &&
response.headers.get('Content-Type') === 'application/json'
/^application\/json(;.*)?$/.test(
response.headers.get('Content-Type') || ''
)
) {
resultPromise = response.json();
} else if (