joehewitt/express-rewrite — pull request #4 by eladb (2012-09-09 19:38:02+00:00)
Title: Match rewrite targets against pathname and not entire url

Issue: hitting an express app with a rewrite target for `/xxx` with a
request to `/xxx?hello=1` will respond with 500 server error.

This is beacuse the route matching in `rewrite.js` is done against the
entire url and not only the pathname.

Instead of matching against the entire url, use only `url.pathname` when
matching rewrite targets.