diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/poco/Net/src/HTTPSessionInstantiator.cpp | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/poco/Net/src/HTTPSessionInstantiator.cpp')
-rw-r--r-- | contrib/libs/poco/Net/src/HTTPSessionInstantiator.cpp | 154 |
1 files changed, 77 insertions, 77 deletions
diff --git a/contrib/libs/poco/Net/src/HTTPSessionInstantiator.cpp b/contrib/libs/poco/Net/src/HTTPSessionInstantiator.cpp index d2f291f6b5..5f7145fe76 100644 --- a/contrib/libs/poco/Net/src/HTTPSessionInstantiator.cpp +++ b/contrib/libs/poco/Net/src/HTTPSessionInstantiator.cpp @@ -1,77 +1,77 @@ -// -// HTTPSessionInstantiator.cpp -// -// Library: Net -// Package: HTTPClient -// Module: HTTPSessionInstantiator -// -// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Net/HTTPSessionInstantiator.h" -#include "Poco/Net/HTTPSessionFactory.h" -#include "Poco/Net/HTTPClientSession.h" - - -using Poco::URI; - - -namespace Poco { -namespace Net { - - -HTTPSessionInstantiator::HTTPSessionInstantiator(): - _proxyPort(0) -{ -} - - -HTTPSessionInstantiator::~HTTPSessionInstantiator() -{ -} - - -HTTPClientSession* HTTPSessionInstantiator::createClientSession(const Poco::URI& uri) -{ - poco_assert (uri.getScheme() == "http"); - HTTPClientSession* pSession = new HTTPClientSession(uri.getHost(), uri.getPort()); - if (!proxyHost().empty()) - { - pSession->setProxy(proxyHost(), proxyPort()); - pSession->setProxyCredentials(proxyUsername(), proxyPassword()); - } - return pSession; -} - - -void HTTPSessionInstantiator::registerInstantiator() -{ - HTTPSessionFactory::defaultFactory().registerProtocol("http", new HTTPSessionInstantiator); -} - - -void HTTPSessionInstantiator::unregisterInstantiator() -{ - HTTPSessionFactory::defaultFactory().unregisterProtocol("http"); -} - - -void HTTPSessionInstantiator::setProxy(const std::string& host, Poco::UInt16 port) -{ - _proxyHost = host; - _proxyPort = port; -} - - -void HTTPSessionInstantiator::setProxyCredentials(const std::string& username, const std::string& password) -{ - _proxyUsername = username; - _proxyPassword = password; -} - - -} } // namespace Poco::Net +// +// HTTPSessionInstantiator.cpp +// +// Library: Net +// Package: HTTPClient +// Module: HTTPSessionInstantiator +// +// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "Poco/Net/HTTPSessionInstantiator.h" +#include "Poco/Net/HTTPSessionFactory.h" +#include "Poco/Net/HTTPClientSession.h" + + +using Poco::URI; + + +namespace Poco { +namespace Net { + + +HTTPSessionInstantiator::HTTPSessionInstantiator(): + _proxyPort(0) +{ +} + + +HTTPSessionInstantiator::~HTTPSessionInstantiator() +{ +} + + +HTTPClientSession* HTTPSessionInstantiator::createClientSession(const Poco::URI& uri) +{ + poco_assert (uri.getScheme() == "http"); + HTTPClientSession* pSession = new HTTPClientSession(uri.getHost(), uri.getPort()); + if (!proxyHost().empty()) + { + pSession->setProxy(proxyHost(), proxyPort()); + pSession->setProxyCredentials(proxyUsername(), proxyPassword()); + } + return pSession; +} + + +void HTTPSessionInstantiator::registerInstantiator() +{ + HTTPSessionFactory::defaultFactory().registerProtocol("http", new HTTPSessionInstantiator); +} + + +void HTTPSessionInstantiator::unregisterInstantiator() +{ + HTTPSessionFactory::defaultFactory().unregisterProtocol("http"); +} + + +void HTTPSessionInstantiator::setProxy(const std::string& host, Poco::UInt16 port) +{ + _proxyHost = host; + _proxyPort = port; +} + + +void HTTPSessionInstantiator::setProxyCredentials(const std::string& username, const std::string& password) +{ + _proxyUsername = username; + _proxyPassword = password; +} + + +} } // namespace Poco::Net |