Browse files

dont crash on HEAD server errors

  • Loading branch information...
1 parent a437bfd commit 80bcf27b3c1b9062c94a97d945ec327a5977d1a5 @mhansen committed Jun 20, 2010
Showing with 4 additions and 2 deletions.
  1. +3 −1 lib/antinode.js
  2. +1 −1 package.json
View
4 lib/antinode.js
@@ -182,7 +182,9 @@ function handle_request(path, req, resp) {
function server_error(message) {
log.error(message);
send_headers(500, message.length, "text/plain");
- resp.write(message);
+ if (req.method !== 'HEAD') {
+ resp.write(message);
+ }
finish(resp);
}
View
2 package.json
@@ -1,6 +1,6 @@
{ "name" : "antinode"
, "description" : "A simple web server for node.js"
-, "version" : "2.0.4"
+, "version" : "2.0.5"
, "author" : "Mark Hansen <mark@markhansen.co.nz>"
, "contributors" :
[ "Ben Noordhuis <info@bnoordhuis.nl>"

0 comments on commit 80bcf27

Please sign in to comment.