mirror of
https://github.com/swift-server/async-http-client.git
synced 2026-06-02 07:37:34 +00:00
* Enable clients to call URLs that include %2F as an escaped backslash Previously `percentEncodedPath` was using `path.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)` which converts %2F to a literal '/'. This prevented users fetching URLs like https://api.travis-ci.org/repo/github/rails%2Frails which use %2F as part of a path segment. Migrating to `URLComponents(url: self, resolvingAgainstBaseURL: false)?.percentEncodedPath` has the desired behaviour for the couple of test cases that exist. Updated the test server to switch on the `percentEncodedPath` so it's easier to understand the desired behaviour.