omnigateway 0.4.6 → 0.4.7
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/bin/omni.js +6 -3
- package/gateway.js +6 -3
- package/package.json +1 -1
package/bin/omni.js
CHANGED
|
@@ -2879,6 +2879,7 @@ var grokAdapter = {
|
|
|
2879
2879
|
import { request as httpRequest } from "http";
|
|
2880
2880
|
import { request as httpsRequest } from "https";
|
|
2881
2881
|
import { Readable } from "stream";
|
|
2882
|
+
var CONNECT_ATTEMPT_TIMEOUT_MS = 3000;
|
|
2882
2883
|
function nodeHttpClient(options = {}) {
|
|
2883
2884
|
const logger2 = options.logger ?? noopLogger;
|
|
2884
2885
|
const now = options.now ?? (() => Date.now());
|
|
@@ -2907,15 +2908,17 @@ function nodeHttpClient(options = {}) {
|
|
|
2907
2908
|
if (req.body.length > 0 && !hasHeader(req, "content-length")) {
|
|
2908
2909
|
headers["Content-Length"] = bodyBytes.byteLength;
|
|
2909
2910
|
}
|
|
2910
|
-
const
|
|
2911
|
+
const requestOptions = {
|
|
2911
2912
|
protocol: url.protocol,
|
|
2912
2913
|
hostname: url.hostname,
|
|
2913
2914
|
port: url.port || (url.protocol === "https:" ? 443 : 80),
|
|
2914
2915
|
path: `${url.pathname}${url.search}`,
|
|
2915
2916
|
method: req.method,
|
|
2916
2917
|
headers,
|
|
2917
|
-
setHost: !hasHeader(req, "host")
|
|
2918
|
-
|
|
2918
|
+
setHost: !hasHeader(req, "host"),
|
|
2919
|
+
autoSelectFamilyAttemptTimeout: CONNECT_ATTEMPT_TIMEOUT_MS
|
|
2920
|
+
};
|
|
2921
|
+
const outgoing = send(requestOptions, (incoming) => {
|
|
2919
2922
|
const chunks = [];
|
|
2920
2923
|
let buffered = null;
|
|
2921
2924
|
const responseHeaders = new Headers;
|
package/gateway.js
CHANGED
|
@@ -8239,6 +8239,7 @@ var grokAdapter = {
|
|
|
8239
8239
|
import { request as httpRequest } from "http";
|
|
8240
8240
|
import { request as httpsRequest } from "https";
|
|
8241
8241
|
import { Readable } from "stream";
|
|
8242
|
+
var CONNECT_ATTEMPT_TIMEOUT_MS = 3000;
|
|
8242
8243
|
function nodeHttpClient(options = {}) {
|
|
8243
8244
|
const logger2 = options.logger ?? noopLogger;
|
|
8244
8245
|
const now = options.now ?? (() => Date.now());
|
|
@@ -8267,15 +8268,17 @@ function nodeHttpClient(options = {}) {
|
|
|
8267
8268
|
if (req.body.length > 0 && !hasHeader(req, "content-length")) {
|
|
8268
8269
|
headers["Content-Length"] = bodyBytes.byteLength;
|
|
8269
8270
|
}
|
|
8270
|
-
const
|
|
8271
|
+
const requestOptions = {
|
|
8271
8272
|
protocol: url.protocol,
|
|
8272
8273
|
hostname: url.hostname,
|
|
8273
8274
|
port: url.port || (url.protocol === "https:" ? 443 : 80),
|
|
8274
8275
|
path: `${url.pathname}${url.search}`,
|
|
8275
8276
|
method: req.method,
|
|
8276
8277
|
headers,
|
|
8277
|
-
setHost: !hasHeader(req, "host")
|
|
8278
|
-
|
|
8278
|
+
setHost: !hasHeader(req, "host"),
|
|
8279
|
+
autoSelectFamilyAttemptTimeout: CONNECT_ATTEMPT_TIMEOUT_MS
|
|
8280
|
+
};
|
|
8281
|
+
const outgoing = send(requestOptions, (incoming) => {
|
|
8279
8282
|
const chunks = [];
|
|
8280
8283
|
let buffered = null;
|
|
8281
8284
|
const responseHeaders = new Headers;
|
package/package.json
CHANGED