Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Fixes path truncation in PathMiddlewareDecorator to be case insensitive #169

Merged

Conversation

weierophinney
Copy link
Member

In #168, we received a report indicating that path matching within PathMiddlewareDecorator fails if the path is the same, but using a different case.

Interestingly, we match it correctly; the problem is when preparing the truncated path to pass on to the decorated middleware, as it cannot identify the matched segment correctly.

This patch modifies the logic in getTruncatedPath() to do a case-insensitive comparison of the segment and the path in the initial condition.

This problem is likely relevant in current master as well, and will be ported to that branch on completion.

Fixes #168

In zendframework#168, we received a report indicating that path matching within
`PathMiddlewareDecorator` fails if the path is the same, but using a
different case.

Interestingly, we _match_ it correctly; the problem is when _preparing
the truncated path_ to pass on to the decorated middleware, as it cannot
identify the matched segment correctly.

This patch modifies the logic in `getTruncatedPath()` to do a
case-insensitive comparison of the segment and the path in the initial
condition.
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.

None yet

1 participant