Skip to content

Commit 6632b3d

Browse 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 <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 99ed5ed commit 6632b3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎lib/_http_server.js‎

Lines changed: 1 addition & 1 deletion
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‎

Lines 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=functionsetMaxSendFragment(size){
548-
returnthis._handle.setMaxSendFragment(size)==1;
548+
returnthis._handle.setMaxSendFragment(size)===1;
549549
};
550550

551551
TLSSocket.prototype.getTLSTicket=functiongetTLSTicket(){

0 commit comments

Comments
(0)