Permalink
Browse files

misc

  • Loading branch information...
1 parent 9be5992 commit 83c2c176a95bdeb2cc774f2cf003918d914c171b @tj tj committed Apr 26, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/router/index.js
View
@@ -270,10 +270,16 @@ function match(req, routes, i) {
var captures
, method = req.method
, i = i || 0;
+
+ // pass HEAD to GET routes
if ('HEAD' == method) method = 'GET';
+
+ // routes for this method
if (routes = routes[method]) {
var url = parse(req.url)
, pathname = url.pathname;
+
+ // matching routes
for (var len = routes.length; i < len; ++i) {
var route = routes[i]
, fn = route.callback

0 comments on commit 83c2c17

Please sign in to comment.