summaryrefslogtreecommitdiff
path: root/lib/_http_server.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_http_server.js')
-rw-r--r--lib/_http_server.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/_http_server.js b/lib/_http_server.js
index 20012a5ab1..d8b9799438 100644
--- a/lib/_http_server.js
+++ b/lib/_http_server.js
@@ -153,7 +153,7 @@ ServerResponse.prototype._implicitHeader = function() {
ServerResponse.prototype.writeHead = function(statusCode, reason, obj) {
var headers;
- if (util.isString(reason)) {
+ if (typeof reason === 'string') {
// writeHead(statusCode, reasonPhrase[, headers])
this.statusMessage = reason;
} else {
@@ -297,7 +297,7 @@ function connectionListener(socket) {
parser.incoming = null;
// Propagate headers limit from server instance to parser
- if (util.isNumber(this.maxHeadersCount)) {
+ if (typeof this.maxHeadersCount === 'number') {
parser.maxHeaderPairs = this.maxHeadersCount << 1;
} else {
// Set default value because parser may be reused from FreeList
@@ -455,7 +455,7 @@ function connectionListener(socket) {
}
}
- if (!util.isUndefined(req.headers.expect) &&
+ if (req.headers.expect !== undefined &&
(req.httpVersionMajor == 1 && req.httpVersionMinor == 1) &&
continueExpression.test(req.headers['expect'])) {
res._expect_continue = true;