aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bun.js/http.exports.js2
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 =