Don't crash if protocol is missing / not known.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2019-08-08 21:25:28 +02:00
parent 6225f4815b
commit e015ec3f3f
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 4 additions and 0 deletions

View File

@ -152,6 +152,10 @@ namespace remwharead
session = make_unique<HTTPClientSession>(poco_uri.getHost(),
poco_uri.getPort());
}
else
{
throw Poco::Exception("Protocol not supported.");
}
HTTPRequest request(method, path, HTTPMessage::HTTP_1_1);
request.set("User-Agent", string("remwharead/") + global::version);