|
|
@ -228,7 +228,7 @@ OutgoingMessage.prototype._storeHeader = function(firstLine, headers) { |
|
|
|
} |
|
|
|
|
|
|
|
// Date header
|
|
|
|
if (this.sendDate == true && state.sentDateHeader == false) { |
|
|
|
if (this.sendDate === true && state.sentDateHeader === false) { |
|
|
|
state.messageHeader += 'Date: ' + utcDate() + CRLF; |
|
|
|
} |
|
|
|
|
|
|
@ -244,7 +244,7 @@ OutgoingMessage.prototype._storeHeader = function(firstLine, headers) { |
|
|
|
// of creating security liabilities, so suppress the zero chunk and force
|
|
|
|
// the connection to close.
|
|
|
|
var statusCode = this.statusCode; |
|
|
|
if ((statusCode == 204 || statusCode === 304) && |
|
|
|
if ((statusCode === 204 || statusCode === 304) && |
|
|
|
this.chunkedEncoding === true) { |
|
|
|
debug(statusCode + ' response should not use chunked encoding,' + |
|
|
|
' closing connection.'); |
|
|
@ -269,8 +269,8 @@ OutgoingMessage.prototype._storeHeader = function(firstLine, headers) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (state.sentContentLengthHeader == false && |
|
|
|
state.sentTransferEncodingHeader == false) { |
|
|
|
if (state.sentContentLengthHeader === false && |
|
|
|
state.sentTransferEncodingHeader === false) { |
|
|
|
if (this._hasBody && !this._removedHeader['transfer-encoding']) { |
|
|
|
if (this.useChunkedEncodingByDefault) { |
|
|
|
state.messageHeader += 'Transfer-Encoding: chunked\r\n'; |
|
|
|