Browse files

Updated example and readme with a little bit more info

  • Loading branch information...
1 parent 0256fd5 commit 9a530480310580a41e4cddd2b581d68d4a7a0d3c @andrewvc andrewvc committed Apr 6, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −3 README.md
  2. +0 −1 example/basic.js
View
5 README.md
@@ -6,7 +6,7 @@ A node.js module for delivering static files.
## Features
- * Configurable callbacks on most eventslist
+ * Configurable callbacks on most events
* ETag / 304 Support
* Custom HTTP headers
@@ -43,7 +43,6 @@ Example from example/basic.js:
.otherwise(function(err) {
var statCode = 404;
res.writeHead(statCode, {'Content-Type': 'text/plain'});
- res.close("Not Found");
log(statCode, req.url, ip, err);
});
}).listen(PORT);
@@ -80,7 +79,7 @@ Fires after a file has been successfully delivered from the `webroot`. statCode
#### error(statCode,msg)
-Fires if there was an error delivering a file from the `webroot`. statCode contains the numeric HTTP status code that was sent to the clientmsg contains the error message.
+Fires if there was an error delivering a file from the `webroot`. statCode contains the numeric HTTP status code that was sent to the clientmsg contains the error message. You must close the connection yourself if the error callback fires!
#### otherwise()
View
1 example/basic.js
@@ -29,7 +29,6 @@ http.createServer(function(req, res) {
.otherwise(function(err) {
var statCode = 404;
res.writeHead(statCode, {'Content-Type': 'text/plain'});
- res.close("Not Found");
log(statCode, req.url, ip, err);
});
}).listen(PORT);

0 comments on commit 9a53048

Please sign in to comment.