Don't crash if protocol is missing / not known.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
6225f4815b
commit
e015ec3f3f
|
@ -152,6 +152,10 @@ namespace remwharead
|
||||||
session = make_unique<HTTPClientSession>(poco_uri.getHost(),
|
session = make_unique<HTTPClientSession>(poco_uri.getHost(),
|
||||||
poco_uri.getPort());
|
poco_uri.getPort());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw Poco::Exception("Protocol not supported.");
|
||||||
|
}
|
||||||
|
|
||||||
HTTPRequest request(method, path, HTTPMessage::HTTP_1_1);
|
HTTPRequest request(method, path, HTTPMessage::HTTP_1_1);
|
||||||
request.set("User-Agent", string("remwharead/") + global::version);
|
request.set("User-Agent", string("remwharead/") + global::version);
|
||||||
|
|
Loading…
Reference in New Issue