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

HttpClient: refactor the way we clean utm_ query params #276

Merged
merged 3 commits into from
Dec 13, 2021

Conversation

Kdecherf
Copy link
Collaborator

PR for 2.x, see #252 (comment)

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>
Copy link
Owner

@j0k3r j0k3r left a comment

Choose a reason for hiding this comment

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

Thanks!

@j0k3r j0k3r merged commit 93b7c63 into j0k3r:2.x Dec 13, 2021
@Kdecherf Kdecherf deleted the fix/utm-query-2.x branch February 28, 2022 11:45
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.

2 participants