-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
HttpClient: refactor the way we clean utm_ query params #252
Conversation
Also: - test PHP 8.1 - update to PHPStan@1 - allow symfony/* 6.0
Type everything
6dfe4d5
to
1fb0ea3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, you can squash 👍
The old preg_replace call incorrectly removed the ? of the query string section which could lead to things like this: http://example.com/foo?utm_source=a&var=value => http://example.com/foo&var=value Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
As per RFC3986, Section 3.4 indicates that we can avoid percent-encoding the'/' and '?' characters. However the '=' character in the nested query string should be encoded. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Uri::withQueryValues() has been added in psr7 1.5.0 but our direct dependency http-factory-guzzle is currently set to require ^1.4.2 which could cause issues on some installations. Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
1fb0ea3
to
8bcef77
Compare
Sh*t I fucked up the PR when changing the base branch and then merged it 🤦♂️ |
The old
preg_replace
call incorrectly removed the?
of the query stringsection which could lead to things like this:
http://example.com/foo?utm_source=a&var=value
=>http://example.com/foo&var=value