Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants