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 double encoding of path parameters #14

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

czechboy0
Copy link
Collaborator

Motivation

Fixes apple/swift-openapi-generator#251.

Modifications

Use the already escaped path setter on URLComponents to avoid the second encoding pass.

Result

Path parameters that needed escaping are only escaped once, not twice.

Test Plan

Adapted the existing unit test to cover a path item that needs escaping.

@czechboy0 czechboy0 added the semver/patch No public API change. label Sep 7, 2023
@czechboy0 czechboy0 merged commit 8d34af5 into apple:main Sep 7, 2023
@czechboy0 czechboy0 deleted the hd-path-double-encoding branch September 7, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URLSession and AHC transports double-encode path parameters
2 participants