Skip to content

Navigation Menu

Sign in
Appearance settings

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

Appearance settings

Commit 65cda7f

Browse filesBrowse files
walterbmaddaleax
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 eb369f6 commit 65cda7f
Copy full SHA for 65cda7f

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎lib/_http_server.js‎

Copy file name to clipboardExpand all lines: lib/_http_server.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ function connectionListener(socket) {
525525
}
526526

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

Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+1-1Lines changed: 1 addition & 1 deletion
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.