mirror of
				https://github.com/pocoproject/poco.git
				synced 2025-10-30 05:29:41 +01:00 
			
		
		
		
	Replace "localhost" by "127.0.0.1"
This commit is contained in:
		| @@ -89,7 +89,7 @@ HTTPSClientSessionTest::~HTTPSClientSessionTest() | ||||
| void HTTPSClientSessionTest::testGetSmall() | ||||
| { | ||||
| 	HTTPSTestServer srv; | ||||
| 	HTTPSClientSession s("localhost", srv.port()); | ||||
| 	HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 	HTTPRequest request(HTTPRequest::HTTP_GET, "/small"); | ||||
| 	s.sendRequest(request); | ||||
| 	HTTPResponse response; | ||||
| @@ -105,7 +105,7 @@ void HTTPSClientSessionTest::testGetSmall() | ||||
| void HTTPSClientSessionTest::testGetLarge() | ||||
| { | ||||
| 	HTTPSTestServer srv; | ||||
| 	HTTPSClientSession s("localhost", srv.port()); | ||||
| 	HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 	HTTPRequest request(HTTPRequest::HTTP_GET, "/large"); | ||||
| 	s.sendRequest(request); | ||||
| 	HTTPResponse response; | ||||
| @@ -121,7 +121,7 @@ void HTTPSClientSessionTest::testGetLarge() | ||||
| void HTTPSClientSessionTest::testHead() | ||||
| { | ||||
| 	HTTPSTestServer srv; | ||||
| 	HTTPSClientSession s("localhost", srv.port()); | ||||
| 	HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 	HTTPRequest request(HTTPRequest::HTTP_HEAD, "/large"); | ||||
| 	s.sendRequest(request); | ||||
| 	HTTPResponse response; | ||||
| @@ -136,7 +136,7 @@ void HTTPSClientSessionTest::testHead() | ||||
| void HTTPSClientSessionTest::testPostSmallIdentity() | ||||
| { | ||||
| 	HTTPSTestServer srv; | ||||
| 	HTTPSClientSession s("localhost", srv.port()); | ||||
| 	HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 	HTTPRequest request(HTTPRequest::HTTP_POST, "/echo"); | ||||
| 	std::string body("this is a random request body\r\n0\r\n"); | ||||
| 	request.setContentLength((int) body.length()); | ||||
| @@ -153,7 +153,7 @@ void HTTPSClientSessionTest::testPostSmallIdentity() | ||||
| void HTTPSClientSessionTest::testPostLargeIdentity() | ||||
| { | ||||
| 	HTTPSTestServer srv; | ||||
| 	HTTPSClientSession s("localhost", srv.port()); | ||||
| 	HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 	HTTPRequest request(HTTPRequest::HTTP_POST, "/echo"); | ||||
| 	std::string body(8000, 'x'); | ||||
| 	body.append("\r\n0\r\n"); | ||||
| @@ -171,7 +171,7 @@ void HTTPSClientSessionTest::testPostLargeIdentity() | ||||
| void HTTPSClientSessionTest::testPostSmallChunked() | ||||
| { | ||||
| 	HTTPSTestServer srv; | ||||
| 	HTTPSClientSession s("localhost", srv.port()); | ||||
| 	HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 	HTTPRequest request(HTTPRequest::HTTP_POST, "/echo"); | ||||
| 	std::string body("this is a random request body"); | ||||
| 	request.setChunkedTransferEncoding(true); | ||||
| @@ -189,7 +189,7 @@ void HTTPSClientSessionTest::testPostSmallChunked() | ||||
| void HTTPSClientSessionTest::testPostLargeChunked() | ||||
| { | ||||
| 	HTTPSTestServer srv; | ||||
| 	HTTPSClientSession s("localhost", srv.port()); | ||||
| 	HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 	HTTPRequest request(HTTPRequest::HTTP_POST, "/echo"); | ||||
| 	std::string body(16000, 'x'); | ||||
| 	request.setChunkedTransferEncoding(true); | ||||
| @@ -211,7 +211,7 @@ void HTTPSClientSessionTest::testPostLargeChunkedKeepAlive() | ||||
| 	srv.start(); | ||||
| 	try | ||||
| 	{ | ||||
| 		HTTPSClientSession s("localhost", srv.port()); | ||||
| 		HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 		s.setKeepAlive(true); | ||||
| 		for (int i = 0; i < 10; ++i) | ||||
| 		{ | ||||
| @@ -240,7 +240,7 @@ void HTTPSClientSessionTest::testPostLargeChunkedKeepAlive() | ||||
| void HTTPSClientSessionTest::testKeepAlive() | ||||
| { | ||||
| 	HTTPSTestServer srv; | ||||
| 	HTTPSClientSession s("localhost", srv.port()); | ||||
| 	HTTPSClientSession s("127.0.0.1", srv.port()); | ||||
| 	s.setKeepAlive(true); | ||||
| 	HTTPRequest request(HTTPRequest::HTTP_HEAD, "/keepAlive", HTTPMessage::HTTP_1_1); | ||||
| 	s.sendRequest(request); | ||||
| @@ -351,7 +351,7 @@ void HTTPSClientSessionTest::testCachedSession() | ||||
| 		""); | ||||
| 	//pClientContext->enableSessionCache(true); | ||||
|  | ||||
| 	HTTPSClientSession s1("localhost", srv.port(), pClientContext); | ||||
| 	HTTPSClientSession s1("127.0.0.1", srv.port(), pClientContext); | ||||
| 	HTTPRequest request1(HTTPRequest::HTTP_GET, "/small"); | ||||
| 	s1.sendRequest(request1); | ||||
| 	Session::Ptr pSession1 = s1.sslSession(); | ||||
| @@ -363,7 +363,7 @@ void HTTPSClientSessionTest::testCachedSession() | ||||
| 	StreamCopier::copyStream(rs1, ostr1); | ||||
| 	assertTrue (ostr1.str() == HTTPSTestServer::SMALL_BODY); | ||||
|  | ||||
| 	HTTPSClientSession s2("localhost", srv.port(), pClientContext, pSession1); | ||||
| 	HTTPSClientSession s2("127.0.0.1", srv.port(), pClientContext, pSession1); | ||||
| 	HTTPRequest request2(HTTPRequest::HTTP_GET, "/small"); | ||||
| 	s2.sendRequest(request2); | ||||
| 	Session::Ptr pSession2 = s2.sslSession(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Francis ANDRE
					Francis ANDRE