xshell 1.0.32 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/net.browser.js +3 -1
- package/package.json +1 -1
- package/server.js +2 -1
package/net.browser.js
CHANGED
|
@@ -15,7 +15,9 @@ const drop_request_headers = new Set([
|
|
|
15
15
|
]);
|
|
16
16
|
async function fetch_retry(url, options, timeout, retries = 0, count = 0) {
|
|
17
17
|
try {
|
|
18
|
-
|
|
18
|
+
// 旧的浏览器可能没有这个函数
|
|
19
|
+
if (AbortSignal.timeout)
|
|
20
|
+
options.signal = AbortSignal.timeout(timeout);
|
|
19
21
|
return await fetch(url, options);
|
|
20
22
|
}
|
|
21
23
|
catch (error) {
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -244,7 +244,8 @@ export class Server {
|
|
|
244
244
|
response.body = Readable.fromWeb(response_.body);
|
|
245
245
|
}
|
|
246
246
|
catch (error) {
|
|
247
|
-
|
|
247
|
+
if (error.status !== 404)
|
|
248
|
+
console.log(error);
|
|
248
249
|
if (error.response) {
|
|
249
250
|
const { status, headers, text } = error.response;
|
|
250
251
|
response.status = status;
|