mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-30 05:39:03 +01:00
fixed GH# 251: HTTPStreamFactory::unregisterFactory missing implementation?
This commit is contained in:
parent
915265f2cb
commit
981b0a1ae4
@ -121,6 +121,10 @@ public:
|
||||
/// Registers the FTPStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
static void unregisterFactory();
|
||||
/// Unregisters the FTPStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
protected:
|
||||
static void splitUserInfo(const std::string& userInfo, std::string& username, std::string& password);
|
||||
static void getUserInfo(const Poco::URI& uri, std::string& username, std::string& password);
|
||||
|
@ -254,4 +254,10 @@ void FTPStreamFactory::registerFactory()
|
||||
}
|
||||
|
||||
|
||||
void FTPStreamFactory::unregisterFactory()
|
||||
{
|
||||
URIStreamOpener::defaultOpener().unregisterStreamFactory("ftp");
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
@ -180,4 +180,10 @@ void HTTPStreamFactory::registerFactory()
|
||||
}
|
||||
|
||||
|
||||
void HTTPStreamFactory::unregisterFactory()
|
||||
{
|
||||
URIStreamOpener::defaultOpener().unregisterStreamFactory("http");
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
@ -81,6 +81,10 @@ public:
|
||||
static void registerFactory();
|
||||
/// Registers the HTTPSStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
static void unregisterFactory();
|
||||
/// Unregisters the HTTPSStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
private:
|
||||
enum
|
||||
|
@ -181,8 +181,13 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
||||
|
||||
void HTTPSStreamFactory::registerFactory()
|
||||
{
|
||||
std::string https("https");
|
||||
URIStreamOpener::defaultOpener().registerStreamFactory(https, new HTTPSStreamFactory);
|
||||
URIStreamOpener::defaultOpener().registerStreamFactory("https", new HTTPSStreamFactory);
|
||||
}
|
||||
|
||||
|
||||
void HTTPSStreamFactory::unregisterFactory()
|
||||
{
|
||||
URIStreamOpener::defaultOpener().unregisterStreamFactory("https");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user