Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
http: Hush 'MUST NOT have a body' warnings to debug()
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jun 21, 2012
1 parent 6e5217d commit 260695a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/http.js
Expand Up @@ -705,8 +705,8 @@ OutgoingMessage.prototype.write = function(chunk, encoding) {
}

if (!this._hasBody) {
console.error('This type of response MUST NOT have a body. ' +
'Ignoring write() calls.');
debug('This type of response MUST NOT have a body. ' +
'Ignoring write() calls.');
return true;
}

Expand Down Expand Up @@ -767,8 +767,8 @@ OutgoingMessage.prototype.end = function(data, encoding) {
}

if (data && !this._hasBody) {
console.error('This type of response MUST NOT have a body. ' +
'Ignoring data passed to end().');
debug('This type of response MUST NOT have a body. ' +
'Ignoring data passed to end().');
data = false;
}

Expand Down

0 comments on commit 260695a

Please sign in to comment.