Don't throw on HEAD requests

This commit is contained in:
Ryan Dahl 2010-08-12 10:06:52 -07:00
parent 72e4a49cac
commit 9acd76ed6e

View File

@ -433,7 +433,8 @@ OutgoingMessage.prototype.write = function (chunk, encoding) {
}
if (!this._hasBody) {
throw new Error("This type of response MUST NOT have a body.");
console.error("This type of response MUST NOT have a body. Ignoring write() calls.");
return true;
}
if (typeof chunk !== "string"