From 9a6655d06cac5cb938656d51d52e188075554a10 Mon Sep 17 00:00:00 2001 From: Huw Rowlands Date: Fri, 7 Aug 2026 13:15:55 +1000 Subject: [PATCH 1/2] Fall back to internal URL standardization https://github.com/swiftlang/swift-foundation/pull/1942 changed how URL standardization worked in macOS 27.0. Perhaps the new implementation is more correct, but it is inconsistent with the other implementations o_O For appleOS 27.0 and above, I have changed it to fall back to the internal URL standardization, which itself was taken from FoundationEssentails before they changed it in the above PR. AFAICT this is the only failing test. --- FlyingFox/Sources/HTTPDecoder+StandardizePath.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FlyingFox/Sources/HTTPDecoder+StandardizePath.swift b/FlyingFox/Sources/HTTPDecoder+StandardizePath.swift index 68c0a55..2ed43e2 100644 --- a/FlyingFox/Sources/HTTPDecoder+StandardizePath.swift +++ b/FlyingFox/Sources/HTTPDecoder+StandardizePath.swift @@ -42,10 +42,11 @@ extension HTTPDecoder { #if canImport(Darwin) #if compiler(>=6.2) if !fallback, #available(macOS 26.0, iOS 26.0, tvOS 26.0, watchOS 26.0, visionOS 26.0, *) { - return URL(string: path)?.standardized.path - } else { - return standardizePathDarwinFallback(path) + if #unavailable(anyAppleOS 27.0) { + return URL(string: path)?.standardized.path + } } + return standardizePathDarwinFallback(path) #else return standardizePathDarwinFallback(path) #endif From 6a805833b6a35c4c46d76e7b3963a3f6ca2383b0 Mon Sep 17 00:00:00 2001 From: Huw Rowlands Date: Fri, 7 Aug 2026 13:19:49 +1000 Subject: [PATCH 2/2] Use long-form versions Using version checks with `anyAppleOS` is not ready in this project since we must also support older Xcode versions, which have it under a feature flag. --- FlyingFox/Sources/HTTPDecoder+StandardizePath.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlyingFox/Sources/HTTPDecoder+StandardizePath.swift b/FlyingFox/Sources/HTTPDecoder+StandardizePath.swift index 2ed43e2..5837d01 100644 --- a/FlyingFox/Sources/HTTPDecoder+StandardizePath.swift +++ b/FlyingFox/Sources/HTTPDecoder+StandardizePath.swift @@ -42,7 +42,7 @@ extension HTTPDecoder { #if canImport(Darwin) #if compiler(>=6.2) if !fallback, #available(macOS 26.0, iOS 26.0, tvOS 26.0, watchOS 26.0, visionOS 26.0, *) { - if #unavailable(anyAppleOS 27.0) { + if #unavailable(macOS 27.0, iOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0) { return URL(string: path)?.standardized.path } }