Browse Source

Don't throw on HEAD requests

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
9acd76ed6e
  1. 3
      lib/http.js

3
lib/http.js

@ -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"

Loading…
Cancel
Save