Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "tls: add highWaterMark option for connect" #33387

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ Global instance of [`https.Agent`][] for all HTTPS client requests.
<!-- YAML
added: v0.3.6
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/33387
description: The `highWaterMark` option is not supported now.
- version:
- v14.1.0
- v13.14.0
Expand Down Expand Up @@ -270,8 +273,7 @@ Makes a request to a secure web server.
The following additional `options` from [`tls.connect()`][] are also accepted:
`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,
`honorCipherOrder`, `key`, `passphrase`, `pfx`, `rejectUnauthorized`,
`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,
`highWaterMark`.
`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`.

`options` can be an object, a string, or a [`URL`][] object. If `options` is a
string, it is automatically parsed with [`new URL()`][]. If it is a [`URL`][]
Expand Down
9 changes: 6 additions & 3 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,9 @@ being issued by trusted CA (`options.ca`).
<!-- YAML
added: v0.11.3
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/33387
description: The `highWaterMark` option is not supported now.
- version:
- v14.1.0
- v13.14.0
Expand Down Expand Up @@ -1385,15 +1388,15 @@ changes:
TLS connection. When a server offers a DH parameter with a size less
than `minDHSize`, the TLS connection is destroyed and an error is thrown.
**Default:** `1024`.
* `highWaterMark`: {number} Consistent with the readable stream `highWaterMark` parameter.
**Default:** `16 * 1024`.
* `secureContext`: TLS context object created with
[`tls.createSecureContext()`][]. If a `secureContext` is _not_ provided, one
will be created by passing the entire `options` object to
`tls.createSecureContext()`.
* ...: [`tls.createSecureContext()`][] options that are used if the
`secureContext` option is missing, otherwise they are ignored.
* ...: Any [`socket.connect()`][] option not already listed.
* ...: Any [`socket.connect()`][] option not already listed with the following
exception. The `highWaterMark` option is not supported, as the TLS protocol
assumes 16KB as the maximum record size.
* `callback` {Function}
* Returns: {tls.TLSSocket}

Expand Down
4 changes: 1 addition & 3 deletions lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,7 @@ function TLSSocket(socket, opts) {
handle: this._wrapHandle(wrap),
allowHalfOpen: socket ? socket.allowHalfOpen : tlsOptions.allowHalfOpen,
pauseOnCreate: tlsOptions.pauseOnConnect,
manualStart: true,
highWaterMark: tlsOptions.highWaterMark,
manualStart: true
});

// Proxy for API compatibility
Expand Down Expand Up @@ -1580,7 +1579,6 @@ exports.connect = function connect(...args) {
requestOCSP: options.requestOCSP,
enableTrace: options.enableTrace,
pskCallback: options.pskCallback,
highWaterMark: options.highWaterMark,
});

tlssock[kConnectOptions] = options;
Expand Down
66 changes: 0 additions & 66 deletions test/parallel/test-https-hwm.js

This file was deleted.

53 changes: 0 additions & 53 deletions test/parallel/test-tls-connect-hwm-option.js

This file was deleted.