Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with Router trying to URL-decode undefined path segments #964

Merged
merged 3 commits into from
Jul 16, 2013

Conversation

ericf
Copy link
Member

@ericf ericf commented Jul 3, 2013

When Router is dispatching to a route's callbacks, it URL-decodes the matching path segments so that placeholders like req.foo don't have encoded values. Since Router supports registering a route as a Regex, when Router executes that regex it may return an array with some undefined matches. This fixes the issue where Router assumed all items in the array returned from exec() are strings.

TODOs

* No changes.
### Router

* Fixed issue with trying to URL-decode matching path segments that are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a little more clear. I don't really understand what the change is from this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more info as you suggested.

@rgrove
Copy link
Contributor

rgrove commented Jul 3, 2013

👍, but I think the history entry needs to explain the problem more clearly. It should communicate what the problem was, why it was a problem, and what the fixed behavior is.

@ericf
Copy link
Member Author

ericf commented Jul 9, 2013

This is ready go, when the tree is unfrozen.

@ghost ghost assigned ericf Jul 16, 2013
@ericf
Copy link
Member Author

ericf commented Jul 16, 2013

Merging this…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants