Skip to content

Conversation

@jrflat
Copy link
Contributor

@jrflat jrflat commented Aug 21, 2024

The common (but not standardized) way to represent an "HTTP over Unix socket" URL is to use the scheme http+unix and set the URL's host to the percent-encoded path of the socket, e.g.

http+unix://%2Fvar%2Frun%2Fdocker.sock/info

Before the swift-corelibs-foundation re-core, URLComponents would always percent-encode the .host, so this worked as expected. After the re-core, URLComponents now supports and favors IDNA-encoding of the host, breaking this use case.

This PR special-cases the http+unix and https+unix schemes to percent-encode the host like before.

@jrflat
Copy link
Contributor Author

jrflat commented Aug 21, 2024

@swift-ci please test

@jrflat jrflat force-pushed the http-unix-schemes branch from 307a45d to e2f66e8 Compare August 22, 2024 18:21
@jrflat
Copy link
Contributor Author

jrflat commented Aug 22, 2024

Fixed conflicts

@jrflat
Copy link
Contributor Author

jrflat commented Aug 22, 2024

@swift-ci please test

@jrflat jrflat requested review from jmschonfeld and parkera August 23, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants