diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-08-12 10:06:52 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-08-12 10:06:52 -0700 |
commit | 9acd76ed6e020fa540f64eabf4bdb33513795924 (patch) | |
tree | 4204be8417be3a05a6bbf5de970400757b58f146 | |
parent | 72e4a49cac61e9a721a1fdeda124f198301584e5 (diff) | |
download | node-new-9acd76ed6e020fa540f64eabf4bdb33513795924.tar.gz |
Don't throw on HEAD requests
-rw-r--r-- | lib/http.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http.js b/lib/http.js index fee73d2b02..5b67e43817 100644 --- a/lib/http.js +++ b/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" |