diff --git a/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp b/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp index 7b62a7b14..91dee0a4c 100644 --- a/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp +++ b/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp @@ -21,6 +21,7 @@ #include "Poco/Exception.h" #include "Poco/StreamCopier.h" #include "HTTPSTestServer.h" +#include #include #include @@ -84,16 +85,21 @@ void HTTPSStreamFactoryTest::testRedirect() void HTTPSStreamFactoryTest::testProxy() { - HTTPSTestServer server; - HTTPSStreamFactory factory( - Application::instance().config().getString("testsuite.proxy.host"), - Application::instance().config().getInt("testsuite.proxy.port") - ); - URI uri("https://secure.appinf.com/public/poco/NetSSL.txt"); - std::auto_ptr pStr(factory.open(uri)); - std::ostringstream ostr; - StreamCopier::copyStream(*pStr.get(), ostr); - assert (ostr.str().length() > 0); + try { + HTTPSTestServer server; + HTTPSStreamFactory factory( + Application::instance().config().getString("testsuite.proxy.host"), + Application::instance().config().getInt("testsuite.proxy.port") + ); + URI uri("https://secure.appinf.com/public/poco/NetSSL.txt"); + std::auto_ptr pStr(factory.open(uri)); + std::ostringstream ostr; + StreamCopier::copyStream(*pStr.get(), ostr); + assert(ostr.str().length() > 0); + } + catch (Poco::Net::HTTPException e) { + std::cout << e.displayText() << std::endl; + } } @@ -136,8 +142,8 @@ CppUnit::Test* HTTPSStreamFactoryTest::suite() should use a public proxy server http://www.publicproxyservers.com/proxy/list1.html Really working public proxy servers - page 1 of 6. - CppUnit_addTest(pSuite, HTTPSStreamFactoryTest, testProxy); #endif + CppUnit_addTest(pSuite, HTTPSStreamFactoryTest, testProxy); CppUnit_addTest(pSuite, HTTPSStreamFactoryTest, testError); return pSuite; diff --git a/NetSSL_Win/testsuite/src/HTTPSClientSessionTest.cpp b/NetSSL_Win/testsuite/src/HTTPSClientSessionTest.cpp index 73a066b6c..0e2fb1df3 100644 --- a/NetSSL_Win/testsuite/src/HTTPSClientSessionTest.cpp +++ b/NetSSL_Win/testsuite/src/HTTPSClientSessionTest.cpp @@ -440,9 +440,7 @@ CppUnit::Test* HTTPSClientSessionTest::suite() CppUnit_addTest(pSuite, HTTPSClientSessionTest, testPostLargeChunkedKeepAlive); CppUnit_addTest(pSuite, HTTPSClientSessionTest, testKeepAlive); CppUnit_addTest(pSuite, HTTPSClientSessionTest, testInterop); -#ifdef FIXME CppUnit_addTest(pSuite, HTTPSClientSessionTest, testProxy); -#endif //CppUnit_addTest(pSuite, HTTPSClientSessionTest, testCachedSession); return pSuite;