             line.append(Character(byte))
         }
 
-        var byte: Byte?
-        while byte != newLine && !closed {
-            byte = try receiveByte()
+        while !closed, let byte = try receiveByte() where byte != newLine {
             append(byte)
         }
 


    func listen() throws

    func receiveByte() throws -> Byte
    func receiveLine() throws -> String

    func sendHeaderEndOfLine() throws

}

extension HTTPStream {
    func receiveByte() throws -> Byte? {
        return try receive(max: 1).first
    }

    func receiveLine() throws -> String {
        var line: String = ""

        func append(byte: Byte) {
            guard byte >= minimumValidAsciiCharacter else {
                return
            }
