    import Darwin.C
#endif

enum ParsingState {
    case endRequest
    case startRequestContent
}

var hasError = false
var requestContent = ""
var reqid = -1
var state = ParsingState.endRequest

while let input = readLine() {