diff options
| author | 2023-03-27 00:45:52 -0300 | |
|---|---|---|
| committer | 2023-03-26 22:45:52 -0500 | |
| commit | b2d90f07bac9de595053bfd5b4abd93647b4f402 (patch) | |
| tree | d1e00b82927b1b4ecc779901f2f11521f412d716 | |
| parent | 319efe9c7b248e899f75aeca99875542b96a0a2e (diff) | |
| download | bun-b2d90f07bac9de595053bfd5b4abd93647b4f402.tar.gz bun-b2d90f07bac9de595053bfd5b4abd93647b4f402.tar.zst bun-b2d90f07bac9de595053bfd5b4abd93647b4f402.zip | |
fix https default port on http.request (#2490)
* fix https default port on http.request
* Update http.exports.js
| -rw-r--r-- | src/bun.js/http.exports.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/http.exports.js b/src/bun.js/http.exports.js index 433fd7aa0..81407fc0b 100644 --- a/src/bun.js/http.exports.js +++ b/src/bun.js/http.exports.js @@ -1044,7 +1044,7 @@ export class ClientRequest extends OutgoingMessage { // throw new ERR_INVALID_PROTOCOL(protocol, expectedProtocol); } - this.#port = options.port || options.defaultPort || this.#agent?.defaultPort || 80; + this.#port = options.port || options.defaultPort || this.#agent?.defaultPort || (protocol === "https:" ? 443 : 80); const host = (this.#host = options.host = |
