From 0e77f14dd7e1ae021b7529c2d19ebe572257604e Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Tue, 18 Oct 2022 19:44:14 +0400 Subject: [PATCH] OCI: always read channel until end (#284) --- Sources/tart/OCI/Registry.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/tart/OCI/Registry.swift b/Sources/tart/OCI/Registry.swift index 05f00df..b526d2e 100644 --- a/Sources/tart/OCI/Registry.swift +++ b/Sources/tart/OCI/Registry.swift @@ -295,6 +295,7 @@ class Registry { var (channel, response) = try await authAwareRequest(request: request) if doAuth && response.statusCode == HTTPCode.Unauthorized.rawValue { + _ = try await channel.asData() try await auth(response: response) (channel, response) = try await authAwareRequest(request: request) }