The Wayback Machine - https://web.archive.org/web/20250407172907/https://github.com/nodejs/node/commit/6632b3d1ab
Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Commit 6632b3d

Browse filesBrowse files
walterbmMylesBorins
authored andcommitted
lib: use === in _http_server and _tls_wrap
Minor fix to favor strict equality in http_server.js and tls_wrap.js to ensure accurate comparisons without type coercion. PR-URL: #9849 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 99ed5ed commit 6632b3d
Copy full SHA for 6632b3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎lib/_http_server.js

Copy file name to clipboardexpand all lines: lib/_http_server.js
+1-1
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ function connectionListener(socket) {
524524
}
525525

526526
if (req.headers.expect !== undefined &&
527-
(req.httpVersionMajor == 1 && req.httpVersionMinor == 1)) {
527+
(req.httpVersionMajor === 1 && req.httpVersionMinor === 1)) {
528528
if (continueExpression.test(req.headers.expect)) {
529529
res._expect_continue = true;
530530

‎lib/_tls_wrap.js

Copy file name to clipboardexpand all lines: lib/_tls_wrap.js
+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ TLSSocket.prototype.renegotiate = function(options, callback) {
545545
};
546546

547547
TLSSocket.prototype.setMaxSendFragment = function setMaxSendFragment(size) {
548-
return this._handle.setMaxSendFragment(size) == 1;
548+
return this._handle.setMaxSendFragment(size) === 1;
549549
};
550550

551551
TLSSocket.prototype.getTLSTicket = function getTLSTicket() {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.