| 91 | |
| 92 | |
| 93 | HTTPClientSession* HTTPSessionFactory::createClientSession(const Poco::URI& uri) |
| 94 | { |
| 95 | FastMutex::ScopedLock lock(_mutex); |
| 96 | |
| 97 | if (uri.isRelative()) throw Poco::UnknownURISchemeException("Relative URIs are not supported by HTTPSessionFactory."); |
| 98 | |
| 99 | Instantiators::iterator it = _instantiators.find(uri.getScheme()); |
| 100 | if (it != _instantiators.end()) |
| 101 | { |
| 102 | it->second.pIn->setProxy(_proxyHost, _proxyPort); |
| 103 | it->second.pIn->setProxyCredentials(_proxyUsername, _proxyPassword); |
| 104 | return it->second.pIn->createClientSession(uri); |
| 105 | } |
| 106 | else throw Poco::UnknownURISchemeException(uri.getScheme()); |
| 107 | } |
| 108 | |
| 109 | |
| 110 | void HTTPSessionFactory::setProxy(const std::string& host, Poco::UInt16 port) |
no test coverage detected