Permalink
Browse files

passing query in rewrite

  • Loading branch information...
1 parent 18520b6 commit afeca45ef5f9b1e6dcfaa56053d019bd01e39eb3 @mafintosh committed Aug 29, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 index.js
  2. +1 −1 package.json
View
@@ -38,7 +38,7 @@ var router = function() {
req.params = route.pattern(url);
if (!req.params) continue;
if (route.rewrite) {
- req.url = url = route.rewrite(req.params);
+ req.url = url = route.rewrite(req.params)+(index === -1 ? '' : req.url.substr(index));
}
route.fn(req, res, loop);
return;
View
@@ -1,6 +1,6 @@
{
"name":"router",
- "version":"0.6.1",
+ "version":"0.6.2",
"description":"A lean and mean http router",
"keywords":["connect","middleware","router","route","http"],
"repository": {"type": "git", "url": "git://github.com/gett/router.git"},

0 comments on commit afeca45

Please sign in to comment.