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

[#25] Fix path reset on return from nested middleware #26

Merged
merged 3 commits into from
Jan 20, 2015

Conversation

weierophinney
Copy link
Contributor

This is a patch for #25. It updates the test suite to test for both:

  • Routes that had a trailing slash.
  • Routes that did not have a trailing slash.

and ensure that:

  • Routing works with or without the trailing slash.
  • The request URI path is reset to what was specified in the original route.

Add a failure test where / is appended once it move to next middleware
- Also modified to pull body from resulting response instead of the one
  composed in the test case.
Added another test case to test for the inverse condition -- that a
trailing slash **is** present if it was present in the original route.

The fix requires ensuring that the original route is retained, but that
matching is done without trailing slashes. At the same time, the
original route must be retained so that the path is reset correctly --
without double slashes.
@weierophinney weierophinney merged commit 7edfa3b into phly:master Jan 20, 2015
weierophinney added a commit that referenced this pull request Jan 20, 2015
@weierophinney weierophinney deleted the hotfix/25 branch January 20, 2015 18:34
@weierophinney
Copy link
Contributor Author

Included in 0.10.1.

@harikt
Copy link
Contributor

harikt commented Jan 21, 2015

Thank you.

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.

2 participants