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 test Uri with multiple slashes #203

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Fix test Uri with multiple slashes #203

merged 1 commit into from
Sep 22, 2021

Conversation

t0mmy742
Copy link
Contributor

String construction of $path was not respecting PSR-7.

The path can be concatenated without delimiters. But there are two cases where the path has to be adjusted to make the URI reference valid as PHP does not allow to throw an exception in __toString():
- If the path is rootless and an authority is present, the path MUST be prefixed by "/".
- If the path is starting with more than one "/" and no authority is present, the starting slashes MUST be reduced to one.

Fix #202

(This PR also fix one PHPCS warning from Cookies class)

@l0gicgate l0gicgate added this to the 1.5 milestone Sep 22, 2021
@l0gicgate
Copy link
Member

Thank you for this @t0mmy742 I really appreciate your contributions.

@l0gicgate l0gicgate merged commit 323ea3b into slimphp:master Sep 22, 2021
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.

Fix URI Integration Tests
2 participants