virunx 0.1.0 → 0.1.1
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/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -365,14 +365,16 @@ var require_dist2 = __commonJS({
|
|
|
365
365
|
const headers = { ...msg.headers };
|
|
366
366
|
for (const h of HOP_HEADERS)
|
|
367
367
|
delete headers[h];
|
|
368
|
-
const
|
|
369
|
-
host: "
|
|
368
|
+
const opts = {
|
|
369
|
+
host: "localhost",
|
|
370
370
|
port: this.port,
|
|
371
|
+
autoSelectFamily: true,
|
|
371
372
|
method: msg.method,
|
|
372
373
|
path: msg.url,
|
|
373
374
|
headers,
|
|
374
375
|
agent: this.agent
|
|
375
|
-
}
|
|
376
|
+
};
|
|
377
|
+
const req = node_http_1.default.request(opts, (res) => {
|
|
376
378
|
ctx.res = res;
|
|
377
379
|
ctx.status = res.statusCode ?? 502;
|
|
378
380
|
const rh = {};
|
|
@@ -450,7 +452,7 @@ var require_dist2 = __commonJS({
|
|
|
450
452
|
});
|
|
451
453
|
}
|
|
452
454
|
startUpgrade(ctx, msg) {
|
|
453
|
-
const sock = node_net_1.default.connect({ host: "
|
|
455
|
+
const sock = node_net_1.default.connect({ host: "localhost", port: this.port, autoSelectFamily: true });
|
|
454
456
|
ctx.sock = sock;
|
|
455
457
|
ctx.hsBuf = Buffer.alloc(0);
|
|
456
458
|
let failed = false;
|