@@ -18,12 +18,10 @@ #include #include #include -#include - #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFHTTPRequestReply.h" #import "OFString.h" #import "OFTCPSocket.h" @@ -62,21 +60,21 @@ [cond unlock]; client = [listener accept]; if (![[client readLine] isEqual: @"GET /foo HTTP/1.1"]) - assert(0); + OF_ENSURE(0); if (![[client readLine] isEqual: [OFString stringWithFormat: @"Host: 127.0.0.1:%" @PRIu16, port]]) - assert(0); + OF_ENSURE(0); if (![[client readLine] hasPrefix: @"User-Agent:"]) - assert(0); + OF_ENSURE(0); if (![[client readLine] isEqual: @""]) - assert(0); + OF_ENSURE(0); [client writeString: @"HTTP/1.0 200 OK\r\n" @"cONTeNT-lENgTH: 7\r\n" @"\r\n" @"foo\n"