mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
Remove trailing whitespace (#3668)
This commit is contained in:
@@ -42,14 +42,14 @@ void CertificateHandlerFactoryMgr::setFactory(const std::string& name, Certifica
|
||||
delete pFactory;
|
||||
poco_assert(success);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool CertificateHandlerFactoryMgr::hasFactory(const std::string& name) const
|
||||
{
|
||||
return _factories.find(name) != _factories.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const CertificateHandlerFactory* CertificateHandlerFactoryMgr::getFactory(const std::string& name) const
|
||||
{
|
||||
FactoriesMap::const_iterator it = _factories.find(name);
|
||||
|
||||
@@ -80,7 +80,7 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
int redirects = 0;
|
||||
std::string username;
|
||||
std::string password;
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
if (!pSession)
|
||||
@@ -110,7 +110,7 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
std::string path = resolvedURI.getPathAndQuery();
|
||||
if (path.empty()) path = "/";
|
||||
HTTPRequest req(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1);
|
||||
|
||||
|
||||
if (authorize)
|
||||
{
|
||||
HTTPCredentials::extractCredentials(uri, username, password);
|
||||
@@ -118,7 +118,7 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
cred.authenticate(req, res);
|
||||
}
|
||||
|
||||
req.set("User-Agent", Poco::format("poco/%d.%d.%d",
|
||||
req.set("User-Agent", Poco::format("poco/%d.%d.%d",
|
||||
(POCO_VERSION >> 24) & 0xFF,
|
||||
(POCO_VERSION >> 16) & 0xFF,
|
||||
(POCO_VERSION >> 8) & 0xFF));
|
||||
@@ -126,8 +126,8 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
|
||||
pSession->sendRequest(req);
|
||||
std::istream& rs = pSession->receiveResponse(res);
|
||||
bool moved = (res.getStatus() == HTTPResponse::HTTP_MOVED_PERMANENTLY ||
|
||||
res.getStatus() == HTTPResponse::HTTP_FOUND ||
|
||||
bool moved = (res.getStatus() == HTTPResponse::HTTP_MOVED_PERMANENTLY ||
|
||||
res.getStatus() == HTTPResponse::HTTP_FOUND ||
|
||||
res.getStatus() == HTTPResponse::HTTP_SEE_OTHER ||
|
||||
res.getStatus() == HTTPResponse::HTTP_TEMPORARY_REDIRECT);
|
||||
if (moved)
|
||||
@@ -138,7 +138,7 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
resolvedURI.setUserInfo(username + ":" + password);
|
||||
authorize = false;
|
||||
}
|
||||
delete pSession;
|
||||
delete pSession;
|
||||
pSession = 0;
|
||||
++redirects;
|
||||
retry = true;
|
||||
@@ -149,13 +149,13 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
}
|
||||
else if (res.getStatus() == HTTPResponse::HTTP_USEPROXY && !retry)
|
||||
{
|
||||
// The requested resource MUST be accessed through the proxy
|
||||
// given by the Location field. The Location field gives the
|
||||
// URI of the proxy. The recipient is expected to repeat this
|
||||
// The requested resource MUST be accessed through the proxy
|
||||
// given by the Location field. The Location field gives the
|
||||
// URI of the proxy. The recipient is expected to repeat this
|
||||
// single request via the proxy. 305 responses MUST only be generated by origin servers.
|
||||
// only use for one single request!
|
||||
proxyUri.resolve(res.get("Location"));
|
||||
delete pSession;
|
||||
delete pSession;
|
||||
pSession = 0;
|
||||
retry = true; // only allow useproxy once
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void KeyFileHandler::onPrivateKeyRequested(const void* pSender, std::string& pri
|
||||
std::string prefix = serverSide() ? SSLManager::CFG_SERVER_PREFIX : SSLManager::CFG_CLIENT_PREFIX;
|
||||
if (!config.hasProperty(prefix + CFG_PRIV_KEY_FILE))
|
||||
throw Poco::Util::EmptyOptionException(std::string("Missing Configuration Entry: ") + prefix + CFG_PRIV_KEY_FILE);
|
||||
|
||||
|
||||
privateKey = config.getString(prefix + CFG_PRIV_KEY_FILE);
|
||||
}
|
||||
catch (Poco::NullPointerException&)
|
||||
|
||||
@@ -40,14 +40,14 @@ void PrivateKeyFactoryMgr::setFactory(const std::string& name, PrivateKeyFactory
|
||||
delete pFactory;
|
||||
poco_assert(success);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool PrivateKeyFactoryMgr::hasFactory(const std::string& name) const
|
||||
{
|
||||
return _factories.find(name) != _factories.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const PrivateKeyFactory* PrivateKeyFactoryMgr::getFactory(const std::string& name) const
|
||||
{
|
||||
FactoriesMap::const_iterator it = _factories.find(name);
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket():
|
||||
SecureServerSocket::SecureServerSocket():
|
||||
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
||||
{
|
||||
}
|
||||
@@ -38,7 +38,7 @@ SecureServerSocket::SecureServerSocket(Context::Ptr pContext):
|
||||
}
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket(const Socket& socket):
|
||||
SecureServerSocket::SecureServerSocket(const Socket& socket):
|
||||
ServerSocket(socket)
|
||||
{
|
||||
if (!dynamic_cast<SecureServerSocketImpl*>(impl()))
|
||||
@@ -46,7 +46,7 @@ SecureServerSocket::SecureServerSocket(const Socket& socket):
|
||||
}
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog):
|
||||
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog):
|
||||
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
||||
{
|
||||
impl()->bind(address, true);
|
||||
@@ -54,7 +54,7 @@ SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog
|
||||
}
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog, Context::Ptr pContext):
|
||||
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog, Context::Ptr pContext):
|
||||
ServerSocket(new SecureServerSocketImpl(pContext), true)
|
||||
{
|
||||
impl()->bind(address, true);
|
||||
@@ -62,7 +62,7 @@ SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog
|
||||
}
|
||||
|
||||
|
||||
SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog):
|
||||
SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog):
|
||||
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
||||
{
|
||||
IPAddress wildcardAddr;
|
||||
@@ -71,7 +71,7 @@ SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog):
|
||||
impl()->listen(backlog);
|
||||
}
|
||||
|
||||
SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog, Context::Ptr pContext):
|
||||
SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog, Context::Ptr pContext):
|
||||
ServerSocket(new SecureServerSocketImpl(pContext), true)
|
||||
{
|
||||
IPAddress wildcardAddr;
|
||||
|
||||
@@ -26,33 +26,33 @@ namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket():
|
||||
SecureStreamSocket::SecureStreamSocket():
|
||||
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext):
|
||||
SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext, Session::Ptr pSession):
|
||||
SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext, Session::Ptr pSession):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
useSession(pSession);
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address):
|
||||
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
||||
{
|
||||
connect(address);
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName):
|
||||
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
||||
{
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||
@@ -60,14 +60,14 @@ SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
connect(address);
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext, Session::Ptr pSession):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext, Session::Ptr pSession):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
useSession(pSession);
|
||||
@@ -75,7 +75,7 @@ SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Pt
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||
@@ -83,7 +83,7 @@ SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext, Session::Ptr pSession):
|
||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext, Session::Ptr pSession):
|
||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||
{
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||
@@ -92,7 +92,7 @@ SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(const Socket& socket):
|
||||
SecureStreamSocket::SecureStreamSocket(const Socket& socket):
|
||||
StreamSocket(socket)
|
||||
{
|
||||
if (!dynamic_cast<SecureStreamSocketImpl*>(impl()))
|
||||
@@ -100,7 +100,7 @@ SecureStreamSocket::SecureStreamSocket(const Socket& socket):
|
||||
}
|
||||
|
||||
|
||||
SecureStreamSocket::SecureStreamSocket(SocketImpl* pImpl):
|
||||
SecureStreamSocket::SecureStreamSocket(SocketImpl* pImpl):
|
||||
StreamSocket(pImpl)
|
||||
{
|
||||
if (!dynamic_cast<SecureStreamSocketImpl*>(impl()))
|
||||
@@ -140,7 +140,7 @@ void SecureStreamSocket::setPeerHostName(const std::string& hostName)
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const std::string& SecureStreamSocket::getPeerHostName() const
|
||||
{
|
||||
return static_cast<SecureStreamSocketImpl*>(impl())->getPeerHostName();
|
||||
@@ -235,7 +235,7 @@ void SecureStreamSocket::setLazyHandshake(bool flag)
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->setLazyHandshake(flag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool SecureStreamSocket::getLazyHandshake() const
|
||||
{
|
||||
return static_cast<SecureStreamSocketImpl*>(impl())->getLazyHandshake();
|
||||
@@ -265,13 +265,13 @@ Session::Ptr SecureStreamSocket::currentSession()
|
||||
return static_cast<SecureStreamSocketImpl*>(impl())->currentSession();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocket::useSession(Session::Ptr pSession)
|
||||
{
|
||||
static_cast<SecureStreamSocketImpl*>(impl())->useSession(pSession);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool SecureStreamSocket::sessionWasReused()
|
||||
{
|
||||
return static_cast<SecureStreamSocketImpl*>(impl())->sessionWasReused();
|
||||
|
||||
@@ -74,7 +74,7 @@ void SecureStreamSocketImpl::connect(const SocketAddress& address, const Poco::T
|
||||
_impl.connect(address, timeout, !_lazyHandshake);
|
||||
reset(_impl.sockfd());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::connectNB(const SocketAddress& address)
|
||||
{
|
||||
@@ -87,19 +87,19 @@ void SecureStreamSocketImpl::connectSSL()
|
||||
{
|
||||
_impl.connectSSL(!_lazyHandshake);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::bind(const SocketAddress& address, bool reuseAddress)
|
||||
{
|
||||
throw Poco::InvalidAccessException("Cannot bind() a SecureStreamSocketImpl");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::listen(int backlog)
|
||||
{
|
||||
throw Poco::InvalidAccessException("Cannot listen() on a SecureStreamSocketImpl");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::close()
|
||||
{
|
||||
@@ -155,12 +155,12 @@ void SecureStreamSocketImpl::shutdownReceive()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::shutdownSend()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SecureStreamSocketImpl::shutdown()
|
||||
{
|
||||
_impl.shutdown();
|
||||
@@ -200,7 +200,7 @@ void SecureStreamSocketImpl::setLazyHandshake(bool flag)
|
||||
_lazyHandshake = flag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool SecureStreamSocketImpl::getLazyHandshake() const
|
||||
{
|
||||
return _lazyHandshake;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#if defined(__APPLE__)
|
||||
// Some OpenSSL functions are deprecated in OS X 10.7
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user