Skip to content

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 merged commit 7e40bff into swift-server:main Sep 7, 2023
@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Sep 7, 2023
@czechboy0 czechboy0 deleted the hd-path-double-encoding branch September 7, 2023 12:53
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