Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2020-07-23 20:58:04 +0300
committerisaacs <i@izs.me>2020-07-29 21:53:42 +0300
commitad5e07d8bd86d1dbe2b03dc142f8c8d6f4828ffe (patch)
tree97b66f97d77f35774f10a5e3e9957b1897d150bb /node_modules/minipass-fetch/lib/request.js
parenta16994cfdd2f255016f3d8ee60d03473d80eabd8 (diff)
Full dependency reboot
Reinstall everything from a clean node_modules and package-lock.json state. Re-generate list of bundleDependencies and node_modules/.gitignore with a script that does the right thing based on actual dependency state.
Diffstat (limited to 'node_modules/minipass-fetch/lib/request.js')
-rw-r--r--node_modules/minipass-fetch/lib/request.js86
1 files changed, 79 insertions, 7 deletions
diff --git a/node_modules/minipass-fetch/lib/request.js b/node_modules/minipass-fetch/lib/request.js
index 5602315d7..0eb571c95 100644
--- a/node_modules/minipass-fetch/lib/request.js
+++ b/node_modules/minipass-fetch/lib/request.js
@@ -67,12 +67,48 @@ class Request extends Body {
if (signal !== null && signal !== undefined && !isAbortSignal(signal))
throw new TypeError('Expected signal must be an instanceof AbortSignal')
+ // TLS specific options that are handled by node
+ const {
+ ca,
+ cert,
+ ciphers,
+ clientCertEngine,
+ crl,
+ dhparam,
+ ecdhCurve,
+ honorCipherOrder,
+ key,
+ passphrase,
+ pfx,
+ rejectUnauthorized = true,
+ secureOptions,
+ secureProtocol,
+ servername,
+ sessionIdContext,
+ } = init
+
this[INTERNALS] = {
method,
redirect: init.redirect || input.redirect || 'follow',
headers,
parsedURL,
signal,
+ ca,
+ cert,
+ ciphers,
+ clientCertEngine,
+ crl,
+ dhparam,
+ ecdhCurve,
+ honorCipherOrder,
+ key,
+ passphrase,
+ pfx,
+ rejectUnauthorized,
+ secureOptions,
+ secureProtocol,
+ servername,
+ sessionIdContext,
}
// node-fetch-only options
@@ -87,23 +123,23 @@ class Request extends Body {
}
get method() {
- return this[INTERNALS].method;
+ return this[INTERNALS].method
}
get url() {
- return formatUrl(this[INTERNALS].parsedURL);
+ return formatUrl(this[INTERNALS].parsedURL)
}
get headers() {
- return this[INTERNALS].headers;
+ return this[INTERNALS].headers
}
get redirect() {
- return this[INTERNALS].redirect;
+ return this[INTERNALS].redirect
}
get signal() {
- return this[INTERNALS].signal;
+ return this[INTERNALS].signal
}
clone () {
@@ -145,7 +181,7 @@ class Request extends Body {
: null
if (contentLengthValue)
- headers.set('Content-Length', contentLengthValue + '');
+ headers.set('Content-Length', contentLengthValue + '')
// HTTP-network-or-cache fetch step 2.11
if (!headers.has('User-Agent'))
@@ -160,7 +196,27 @@ class Request extends Body {
: request.agent
if (!headers.has('Connection') && !agent)
- headers.set('Connection', 'close');
+ headers.set('Connection', 'close')
+
+ // TLS specific options that are handled by node
+ const {
+ ca,
+ cert,
+ ciphers,
+ clientCertEngine,
+ crl,
+ dhparam,
+ ecdhCurve,
+ honorCipherOrder,
+ key,
+ passphrase,
+ pfx,
+ rejectUnauthorized,
+ secureOptions,
+ secureProtocol,
+ servername,
+ sessionIdContext,
+ } = request[INTERNALS]
// HTTP-network fetch step 4.2
// chunked encoding is handled by Node.js
@@ -170,6 +226,22 @@ class Request extends Body {
method: request.method,
headers: exportNodeCompatibleHeaders(headers),
agent,
+ ca,
+ cert,
+ ciphers,
+ clientCertEngine,
+ crl,
+ dhparam,
+ ecdhCurve,
+ honorCipherOrder,
+ key,
+ passphrase,
+ pfx,
+ rejectUnauthorized,
+ secureOptions,
+ secureProtocol,
+ servername,
+ sessionIdContext,
}
}
}