Don't throw on HEAD requests
This commit is contained in:
parent
72e4a49cac
commit
9acd76ed6e
@ -433,7 +433,8 @@ OutgoingMessage.prototype.write = function (chunk, encoding) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this._hasBody) {
|
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"
|
if (typeof chunk !== "string"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user