summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-08-12 10:06:52 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-08-12 10:06:52 -0700
commit9acd76ed6e020fa540f64eabf4bdb33513795924 (patch)
tree4204be8417be3a05a6bbf5de970400757b58f146
parent72e4a49cac61e9a721a1fdeda124f198301584e5 (diff)
downloadnode-new-9acd76ed6e020fa540f64eabf4bdb33513795924.tar.gz
Don't throw on HEAD requests
-rw-r--r--lib/http.js3
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"