diff --git a/mac/Sources/Byre/Pages.swift b/mac/Sources/Byre/Pages.swift index 457b354..3ba920f 100644 --- a/mac/Sources/Byre/Pages.swift +++ b/mac/Sources/Byre/Pages.swift @@ -164,7 +164,20 @@ private final class PageListener: @unchecked Sendable { } private func serve(_ conn: NWConnection, _ head: String) { - let parts = head.components(separatedBy: "\r\n")[0].split(separator: " ") + let lines = head.components(separatedBy: "\r\n") + let hosts = lines.dropFirst().compactMap { line -> String? in + guard let colon = line.firstIndex(of: ":"), line[..