提交 0287e46a 编写于 作者: M Martin Aeschlimann

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

上级 78636af9
......@@ -8,14 +8,14 @@
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-1.0.2.tgz"
},
"debug": {
"version": "2.6.0",
"version": "2.6.6",
"from": "debug@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz"
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.6.tgz"
},
"extend": {
"version": "3.0.0",
"version": "3.0.1",
"from": "extend@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz"
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz"
},
"http-proxy-agent": {
"version": "0.2.7",
......@@ -33,14 +33,14 @@
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-0.4.2.tgz"
},
"ms": {
"version": "0.7.2",
"from": "ms@0.7.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz"
"version": "0.7.3",
"from": "ms@0.7.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz"
},
"request-light": {
"version": "0.2.0",
"from": "request-light@0.2.0",
"resolved": "https://registry.npmjs.org/request-light/-/request-light-0.2.0.tgz"
"version": "0.2.1",
"from": "request-light@0.2.1",
"resolved": "https://registry.npmjs.org/request-light/-/request-light-0.2.1.tgz"
},
"vscode-json-languageservice": {
"version": "2.0.9",
......
......@@ -9,7 +9,7 @@
},
"dependencies": {
"jsonc-parser": "^0.4.2",
"request-light": "^0.2.0",
"request-light": "^0.2.1",
"vscode-json-languageservice": "^2.0.9",
"vscode-languageserver": "^3.1.0-alpha.1",
"vscode-nls": "^2.0.2"
......
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册