Don't throw on HEAD requests
This commit is contained in:
Родитель
72e4a49cac
Коммит
9acd76ed6e
|
@ -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"
|
||||
|
|
Загрузка…
Ссылка в новой задаче