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

Avoid double encoding of query params when using FoundationClient #244

merged 1 commit into from Mar 12, 2018


2 participants
Copy link

steffendsommer commented Mar 8, 2018

Currently when using FoundationClient query params will be encoded twice since Vapor has already percent-encoded the query at the same it's set to URLComponents. Since the value is expected to not be percent-encoded at the time of assignment I suggest a naive solution where we simple decode it before setting it. I do not have an overview of any potential implications which is why I suggested this on Slack where @tanner0101 seemed fine with the approach.

Please note that I created a vapor-2 (based on the 2.2.3 release) branch in order to be able to open this PR. Let me know if you had another branching strategy in mind.

@steffendsommer steffendsommer requested review from tanner0101 and Joannis Mar 8, 2018

@tanner0101 tanner0101 added this to the 2.2.4 milestone Mar 12, 2018

@tanner0101 tanner0101 added the bug label Mar 12, 2018

@tanner0101 tanner0101 self-assigned this Mar 12, 2018

@tanner0101 tanner0101 merged commit 0ecc50f into vapor-2 Mar 12, 2018

3 checks passed

ci/circleci: linux Your tests passed on CircleCI!
ci/circleci: linux-3 Your tests passed on CircleCI!
ci/circleci: macos Your tests passed on CircleCI!

@tanner0101 tanner0101 deleted the bugfix/avoid-double-encoding-with-foundation-client branch Mar 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment