mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-20 22:31:31 +02:00
added https->http redirect, improved redirect support in streamfactory, fixed client cert validation error
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
|
||||
#include "HTTPSClientSessionTest.h"
|
||||
#include "HTTPSClientTestSuite.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/Net/HTTPSClientSession.h"
|
||||
@@ -336,7 +337,7 @@ void HTTPSClientSessionTest::testKeepAlive()
|
||||
void HTTPSClientSessionTest::testProxy()
|
||||
{
|
||||
HTTPSTestServer srv;
|
||||
HTTPSClientSession s("wwws.appinf.com");
|
||||
HTTPSClientSession s(TESTSERVERNAME);
|
||||
s.setProxy("proxy.aon.at", 8080);
|
||||
HTTPRequest request(HTTPRequest::HTTP_GET, "/");
|
||||
s.sendRequest(request);
|
||||
@@ -351,7 +352,7 @@ void HTTPSClientSessionTest::testProxy()
|
||||
void HTTPSClientSessionTest::testConnectNB()
|
||||
{
|
||||
SecureStreamSocket sock;
|
||||
sock.connectNB(SocketAddress("server.com", 443));
|
||||
sock.connectNB(SocketAddress(TESTSERVERNAME, 443));
|
||||
char buf[512];
|
||||
std::string msg("GET / HTTP/1.0\r\n\r\n");
|
||||
sock.sendBytes(msg.c_str(), (int)msg.length());
|
||||
|
@@ -39,6 +39,8 @@
|
||||
#include "CppUnit/TestSuite.h"
|
||||
|
||||
|
||||
#define TESTSERVERNAME "secure.appinf.com"
|
||||
|
||||
class HTTPSClientTestSuite
|
||||
{
|
||||
public:
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
|
||||
#include "HTTPSStreamFactoryTest.h"
|
||||
#include "HTTPSClientTestSuite.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/Net/HTTPSStreamFactory.h"
|
||||
@@ -103,7 +104,7 @@ void HTTPSStreamFactoryTest::testProxy()
|
||||
{
|
||||
HTTPSTestServer server;
|
||||
HTTPSStreamFactory factory("proxy.aon.at", 8080);
|
||||
URI uri("https://wwws.appinf.com/");
|
||||
URI uri(std::string("https://") + TESTSERVERNAME + "/");
|
||||
std::auto_ptr<std::istream> pStr(factory.open(uri));
|
||||
std::ostringstream ostr;
|
||||
StreamCopier::copyStream(*pStr.get(), ostr);
|
||||
|
Reference in New Issue
Block a user