Permalink
Browse files

refactored options() helper

  • Loading branch information...
1 parent a9992b5 commit 379b9812be18b0ef70f9fd4be7e16405b1567f7b @tj tj committed Apr 25, 2011
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/router/index.js
View
@@ -260,11 +260,7 @@ function router(fn){
function options(req, res, routes) {
var pathname = parse(req.url).pathname
, body = optionsFor(pathname, routes).join(',');
- res.writeHead(200, {
- 'Content-Length': body.length
- , 'Allow': body
- });
- res.end(body);
+ res.send(body, { Allow: body });
}
/**

0 comments on commit 379b981

Please sign in to comment.