JSON schemas served with gzip fail to parse. Fixes #26672

This commit is contained in:
Martin Aeschlimann
2017-05-16 11:29:32 +02:00
parent 78636af970
commit 0287e46ab4
3 changed files with 13 additions and 12 deletions

View File

@@ -111,7 +111,8 @@ let schemaRequestService = (uri: string): Thenable<string> => {
}
});
}
return xhr({ url: uri, followRedirects: 5 }).then(response => {
let headers = { 'Accept-Encoding': 'gzip, deflate' };
return xhr({ url: uri, followRedirects: 5, headers }).then(response => {
return response.responseText;
}, (error: XHRResponse) => {
return Promise.reject(error.responseText || getErrorStatusDescription(error.status) || error.toString());