xshell 1.0.102 → 1.0.104

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +4 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.0.102",
3
+ "version": "1.0.104",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -469,15 +469,10 @@ export class Server {
469
469
  redirect,
470
470
  timeout
471
471
  });
472
- if (response.writable) {
473
- response.status = response_.status;
474
- response.set(Server.filter_response_headers(response_.headers));
475
- if (response_.body)
476
- response.body = response_.body;
477
- }
478
- else
479
- // todo: 临时观察
480
- console.log(`${path_url} 对应的 response.writable === false`);
472
+ response.status = response_.status;
473
+ response.set(Server.filter_response_headers(response_.headers));
474
+ if (response_.body)
475
+ response.body = await stream_to_buffer(response_.body);
481
476
  }
482
477
  catch (error) {
483
478
  if (error.response?.status !== 404)