Remove canImport(HTTPAPIs) from ff-spi-for-httpapis branch#909
Merged
FranzBusch merged 11 commits intoJun 6, 2026
Merged
Conversation
…ing (swift-server#895) - Fix a `fatalError("Invalid state: idle")` crash in `HTTP1ConnectionStateMachine.demandMoreResponseBodyParts()` that occurs when a response completes before the request body finishes uploading - The root cause is that `self.request` was only nilled out inside the write-completion callback for `.sendRequestEnd`, creating a window where `demandResponseBodyStream` could still see the old request and call into the state machine after it had already transitioned to .idle - The fix nils out `self.request` synchronously when handling `.sendRequestEnd` (before the write completes), and moves `requestBodyStreamSent()` to fire after the final action rather than before it --------- Co-authored-by: George Barnett <gbarnett@apple.com>
…#897) Replaces all the foundation imports. One issue is that `HTTPClient.init?(httpsURLWithSocketPath socketPath: String, uri: String = "/")` uses `addingPercentEncoding()` from Foundation. So instead, we use a pure Swift impl. that does the same. We also need to disable default traits from `swift-configuration` to prevent linking Foundation, because the `JSON` trait does that. This also adds a linkage test to prevent regressions to CI.
Motivation In machines with more complex network topologies it is possible for us to have multiple possible NICs we might want to use for a request. Users may wish to vary this on a per-request or even a per-client basis. This control can typically be expressed by offering a local address to bind to before making the connection attempt. Modifications Allow users to express a preferred local address at request or client scope. Make this part of the connection pool key. Bind the local address when specified. Test all of this. Results More capable clients.
Motivation: The cert used in some tests has expired so tests now fail Modifications: - Regenerate Result: Tests pass
Motivation: Swift 6.0 has dropped out of the support policy Modifications: - Remove Package@swift-6.0.swift - Ensure min tools version is 6.1 Result: AHC only supports Swift 6.1+
…er#904) Extending swift-server#878 to also allow configuring the proxy via ConfigReader --------- Co-authored-by: George Barnett <gbarnett@apple.com>
## Summary - Adds `HTTPClient.Configuration.DNSResolver` with `.system` (default) and `.randomized` cases. When `.randomized` is selected, `NIORandomizedDNSResolver` is installed on the underlying `ClientBootstrap`, shuffling addresses returned by `getaddrinfo`. - Motivation: enables DNS-based load balancing for services that publish multiple A/AAAA records (e.g. Kubernetes headless services). The system resolver returns addresses in a deterministic order (typically RFC 6724 destination-address selection), which defeats round-robin DNS — clients hammer the first address. --------- Co-authored-by: Pavan sai kumar alladi <p_alladi@apple.com> Co-authored-by: George Barnett <gbarnett@apple.com>
FranzBusch
approved these changes
Jun 5, 2026
a0ab907
into
swift-server:ff-spi-for-httpapis
34 of 35 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This unblocks apple/swift-http-api-proposal#170