flatiron/director — Issue #59: Can't match ";" or "/" with a wildcard in routes
Author: reid
Created: 2011-12-13 01:20:26+00:00
State: open

Director can not match these characters because `regifyString` will [replace route wildcards with another regexp](https://github.com/flatiron/director/blob/master/lib/director/router.js#L95) which does not match these characters.

The following server responds to `/foo/bar` with "hello world", but will 404 for `/foo/bar;baz` or `/foo/bar/baz`.

```javascript
var union = require('union');
var director = require('director');
var router = new director.http.Router();

router.get(/\/foo\/(.*)/, function () {
this.res.writeHead(200, { 'Content-Type': 'text/plain' })
this.res.end('hello world\n');
});

var server = union.createServer({
before: [
function (req, res) {
var found = router.dispatch(req, res);
if (!found) {
res.emit('next');
}
}
]
});

server.listen(9090);
```