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 #27 #28

Merged
merged 2 commits into from
Jan 21, 2015
Merged

Fix #27 #28

merged 2 commits into from
Jan 21, 2015

Conversation

weierophinney
Copy link
Contributor

Issue #27 provides a test that shows another case when trailing slashes are not
handled correctly. The primary fix for this issue comes from phly/http#23, but
this patch also provides a few semantic changes that should ensure all cases
are handled correctly going forward.

When the uri have the slash, the next request should also have the slash
- Refactored `Next::__invoke()` logic to push argument parsing to another
  method, and thus simplify `__invoke()` to make understanding the code paths
  easier.
- Identified the potential areas where trailing slash was still a problem:
  - path of current request can have a slash, while the removed portion did not;
    these needed separate comparisons.
  - stripping the route from the path only needed to happen if it wasn't empty
    and not '/'
@weierophinney weierophinney merged commit c8d0e0a into phly:master Jan 21, 2015
weierophinney added a commit that referenced this pull request Jan 21, 2015
@weierophinney weierophinney deleted the hotfix/27 branch January 21, 2015 17:29
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.

1 participant