Skip to content

Introduce userInfo encoding tests #67

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

Merged

Conversation

boesing
Copy link
Contributor

@boesing boesing commented Apr 4, 2023

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets fixes #61
License MIT

What's in this PR?

There are two new tests added which verify that the UriInterface#withUserInfo can handle both already encoded and reserved characters.

Why?

Due to the interoperability idea, all PSR-7 implementations should behave the same. I recently found out that not all PSR-7 implementations do behave the same and thus I ended up having invalid URIs.

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix

To Do

@boesing boesing force-pushed the feature/test-psr7-uri-userinfo-encoding branch from 188be3d to db2e1e0 Compare April 4, 2023 14:02
boesing added 2 commits April 4, 2023 16:04
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing force-pushed the feature/test-psr7-uri-userinfo-encoding branch from db2e1e0 to 3f8f2dd Compare April 4, 2023 14:04
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot!

we should add another test for the weird case where there are characters that look encoded and others that are not, e.g. pa%65sw:ord

we discuss this in php-fig/fig-standards#1298 but its unclear there what the expected behaviour is. i will merge this as is for now and create a new issue about the mixed case.

@dbu dbu merged commit ec9d873 into php-http:master Apr 7, 2023
akrabat added a commit to akrabat/Slim-Psr7 that referenced this pull request Apr 10, 2023
Uri:withUserInfo() must not encode already encoded and reserved
characters. See
php-http/psr7-integration-tests#67.
@boesing boesing deleted the feature/test-psr7-uri-userinfo-encoding branch April 13, 2023 00:28
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.

Missing test regarding UriInterface#withUserInfo and passwords containing invalid URL characters
2 participants