mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
committed by
Rich Trott
parent
8e1e15f163
commit
20fa6e7d07
@@ -525,7 +525,7 @@ function connectionListener(socket) {
|
||||
}
|
||||
|
||||
if (req.headers.expect !== undefined &&
|
||||
(req.httpVersionMajor == 1 && req.httpVersionMinor == 1)) {
|
||||
(req.httpVersionMajor === 1 && req.httpVersionMinor === 1)) {
|
||||
if (continueExpression.test(req.headers.expect)) {
|
||||
res._expect_continue = true;
|
||||
|
||||
|
||||
@@ -545,7 +545,7 @@ TLSSocket.prototype.renegotiate = function(options, callback) {
|
||||
};
|
||||
|
||||
TLSSocket.prototype.setMaxSendFragment = function setMaxSendFragment(size) {
|
||||
return this._handle.setMaxSendFragment(size) == 1;
|
||||
return this._handle.setMaxSendFragment(size) === 1;
|
||||
};
|
||||
|
||||
TLSSocket.prototype.getTLSTicket = function getTLSTicket() {
|
||||
|
||||
Reference in New Issue
Block a user