mirror of https://github.com/nodejs/node.git
http: Hush 'MUST NOT have a body' warnings to debug()
parent
6e5217d320
commit
260695afd0
|
@ -705,8 +705,8 @@ OutgoingMessage.prototype.write = function(chunk, encoding) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._hasBody) {
|
if (!this._hasBody) {
|
||||||
console.error('This type of response MUST NOT have a body. ' +
|
debug('This type of response MUST NOT have a body. ' +
|
||||||
'Ignoring write() calls.');
|
'Ignoring write() calls.');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,8 +767,8 @@ OutgoingMessage.prototype.end = function(data, encoding) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data && !this._hasBody) {
|
if (data && !this._hasBody) {
|
||||||
console.error('This type of response MUST NOT have a body. ' +
|
debug('This type of response MUST NOT have a body. ' +
|
||||||
'Ignoring data passed to end().');
|
'Ignoring data passed to end().');
|
||||||
data = false;
|
data = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue