@@ -14,13 +14,11 @@ * file. */ #include "config.h" -#include #include -#include #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFString.h" @@ -38,11 +36,11 @@ static OFCondition *cond; @interface OFHTTPClientTestsServer: OFThread { @public - uint16_t port; + uint16_t _port; } @end @implementation OFHTTPClientTestsServer - main @@ -50,12 +48,12 @@ OFTCPSocket *listener, *client; [cond lock]; listener = [OFTCPSocket socket]; - port = [listener bindToHost: @"127.0.0.1" - port: 0]; + _port = [listener bindToHost: @"127.0.0.1" + port: 0]; [listener listen]; [cond signal]; [cond unlock]; @@ -63,11 +61,11 @@ if (![[client readLine] isEqual: @"GET /foo HTTP/1.1"]) OF_ENSURE(0); if (![[client readLine] isEqual: - [OFString stringWithFormat: @"Host: 127.0.0.1:%" @PRIu16, port]]) + [OFString stringWithFormat: @"Host: 127.0.0.1:%" @PRIu16, _port]]) OF_ENSURE(0); if (![[client readLine] hasPrefix: @"User-Agent:"]) OF_ENSURE(0); @@ -105,11 +103,11 @@ [cond wait]; [cond unlock]; url = [OFURL URLWithString: [OFString stringWithFormat: @"http://127.0.0.1:%" @PRIu16 "/foo", - server->port]]; + server->_port]]; TEST(@"-[performRequest:]", (client = [OFHTTPClient client]) && R(request = [OFHTTPRequest requestWithURL: url]) && R(response = [client performRequest: request]))