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 regression issue #17 #31

Merged
merged 1 commit into from Oct 1, 2017
Merged

Fix regression issue #17 #31

merged 1 commit into from Oct 1, 2017

Conversation

brunoscopelliti
Copy link
Contributor

Fix regression reported in #27 (comment).

@AVVS, I'm sorry for the leaked breaking change.

@coveralls
Copy link

coveralls commented Oct 1, 2017

Coverage Status

Coverage decreased (-0.4%) to 98.031% when pulling 8ec0940 on brunoscopelliti:issue-17-fix into 7f9954e on delvedor:master.

@@ -78,7 +78,7 @@ Router.prototype.on = function (method, path, handler, store) {

if (isRegex && (i === len || path.charCodeAt(i) === 47)) {
nodeType = 3
} else if (i < len) {
} else if (i < len && path.charCodeAt(i) !== 47) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The missing of the check against path.charCodeAt(i) caused that every parametric part of the url that didn't contain a regular expression, and was followed by another part of the url, was treated as a multi-parametric part.

Copy link
Owner

@delvedor delvedor left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you for the fix and thank you @AVVS for spotting it out :)

@mcollina
Copy link
Collaborator

mcollina commented Oct 1, 2017

LGTM

@delvedor delvedor merged commit cee1a6b into delvedor:master Oct 1, 2017
@delvedor
Copy link
Owner

delvedor commented Oct 1, 2017

Landed in v1.6.2 :)

@brunoscopelliti brunoscopelliti deleted the issue-17-fix branch October 1, 2017 17:51
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

4 participants