Conversation

czechboy0

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.

@czechboy0czecy0 merged commit 7e40bff into swift-server:main Sep 7, 2023
@czechboy0czecy0 added the 🔨 semver/No public API change.label Sep 7, 2023
@czechboy0czecy0 deleted the hd-path-double-encoding branch September 7, 2023 12:53
Sign up for free to join this conversation on . Already have an account? Sign in to comment
🔨 semver/No public API change.
None yet

Successfully merging this pull request may close these issues.

URLSession and AHC transports double-encode path parameters